NewTypeParam returns a new TypeParam. Type parameters may be set on a Named or Signature type by calling SetTypeParams. Setting a type parameter on more than one type will result in a panic. The constraint argument can be nil, and set later via SetConstraint. If the constraint is non-nil, it must b
(obj *TypeName, constraint Type)
| 34 | // The constraint argument can be nil, and set later via SetConstraint. If the |
| 35 | // constraint is non-nil, it must be fully defined. |
| 36 | func NewTypeParam(obj *TypeName, constraint Type) *TypeParam { |
| 37 | return (*Checker)(nil).newTypeParam(obj, constraint) |
| 38 | } |
| 39 | |
| 40 | // check may be nil |
| 41 | func (check *Checker) newTypeParam(obj *TypeName, constraint Type) *TypeParam { |