MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / NewTypeParam

Function NewTypeParam

types/typeparam.go:36–38  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

34// The constraint argument can be nil, and set later via SetConstraint. If the
35// constraint is non-nil, it must be fully defined.
36func NewTypeParam(obj *TypeName, constraint Type) *TypeParam {
37 return (*Checker)(nil).newTypeParam(obj, constraint)
38}
39
40// check may be nil
41func (check *Checker) newTypeParam(obj *TypeName, constraint Type) *TypeParam {

Callers 3

inferMethod · 0.85
TestIsAliasFunction · 0.85

Calls 1

newTypeParamMethod · 0.80

Tested by 2

TestIsAliasFunction · 0.68