GetStaticallyKnownType possibly promotes a ResolvableTypeReference into a *types.T if the reference is a statically known type. It is only safe to access the returned type if ok is true.
(ref ResolvableTypeReference)
| 186 | // *types.T if the reference is a statically known type. It is only safe to |
| 187 | // access the returned type if ok is true. |
| 188 | func GetStaticallyKnownType(ref ResolvableTypeReference) (typ *types.T, ok bool) { |
| 189 | typ, ok = ref.(*types.T) |
| 190 | return typ, ok |
| 191 | } |
| 192 | |
| 193 | // MustBeStaticallyKnownType does the same thing as GetStaticallyKnownType but panics |
| 194 | // in the case that the reference is not statically known. This function |
no outgoing calls
no test coverage detected