IsPolymorphicType returns true if the type can be used as the parameter or return-type of a polymorphic function. Note that this does not include RECORD (AnyTuple) or RECORD[].
()
| 2322 | // return-type of a polymorphic function. Note that this does not include RECORD |
| 2323 | // (AnyTuple) or RECORD[]. |
| 2324 | func (t *T) IsPolymorphicType() bool { |
| 2325 | for _, poly := range []*T{AnyElement, AnyArray, AnyEnum, AnyEnumArray} { |
| 2326 | if t.Identical(poly) { |
| 2327 | return true |
| 2328 | } |
| 2329 | } |
| 2330 | return false |
| 2331 | } |
| 2332 | |
| 2333 | // IsPseudoType returns true if the type is a pseudotype. |
| 2334 | func (t *T) IsPseudoType() bool { |
no test coverage detected