Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewTypeParam (0.28 sec)

  1. src/go/types/context_test.go

    	// unaryP has a parameter.
    	var nullaryP, nullaryQ, unaryP Type
    	{
    		// type nullaryP = func[P any]()
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "P", nil), &emptyInterface)
    		nullaryP = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    		// type nullaryQ = func[Q any]()
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "Q", nil), &emptyInterface)
    		nullaryQ = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. src/go/types/typeparam.go

    }
    
    // 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 be fully defined.
    func NewTypeParam(obj *TypeName, constraint Type) *TypeParam {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/typeparam.go

    }
    
    // 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 be fully defined.
    func NewTypeParam(obj *TypeName, constraint Type) *TypeParam {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/object_test.go

    		}
    	}
    
    	// various other types
    	pkg := NewPackage("p", "p")
    	t1 := NewTypeName(nopos, pkg, "t1", nil)
    	n1 := NewNamed(t1, new(Struct), nil)
    	t5 := NewTypeName(nopos, pkg, "t5", nil)
    	NewTypeParam(t5, nil)
    	for _, test := range []struct {
    		name  *TypeName
    		alias bool
    	}{
    		{NewTypeName(nopos, nil, "t0", nil), false}, // no type yet
    		{NewTypeName(nopos, pkg, "t0", nil), false}, // no type yet
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. src/go/types/object_test.go

    		}
    	}
    
    	// various other types
    	pkg := NewPackage("p", "p")
    	t1 := NewTypeName(nopos, pkg, "t1", nil)
    	n1 := NewNamed(t1, new(Struct), nil)
    	t5 := NewTypeName(nopos, pkg, "t5", nil)
    	NewTypeParam(t5, nil)
    	for _, test := range []struct {
    		name  *TypeName
    		alias bool
    	}{
    		{NewTypeName(nopos, nil, "t0", nil), false}, // no type yet
    		{NewTypeName(nopos, pkg, "t0", nil), false}, // no type yet
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top