Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 53 for TypeParam (0.59 sec)

  1. src/go/types/unify.go

    		u.setHandle(x, hy)
    	}
    	return true
    }
    
    // asBoundTypeParam returns x.(*TypeParam) if x is a type parameter recorded with u.
    // Otherwise, the result is nil.
    func (u *unifier) asBoundTypeParam(x Type) *TypeParam {
    	if x, _ := Unalias(x).(*TypeParam); x != nil {
    		if _, found := u.handles[x]; found {
    			return x
    		}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:24:39 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/signature.go

    				if p.Value == "_" {
    					if check.recvTParamMap == nil {
    						check.recvTParamMap = make(map[*syntax.Name]*TypeParam)
    					}
    					check.recvTParamMap[p] = tparams[i]
    				}
    			}
    			// determine receiver type to get its type parameters
    			// and the respective type parameter bounds
    			var recvTParams []*TypeParam
    			if rname != nil {
    				// recv should be a Named type (otherwise an error is reported elsewhere)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  3. src/go/types/signature.go

    				if p.Name == "_" {
    					if check.recvTParamMap == nil {
    						check.recvTParamMap = make(map[*ast.Ident]*TypeParam)
    					}
    					check.recvTParamMap[p] = tparams[i]
    				}
    			}
    			// determine receiver type to get its type parameters
    			// and the respective type parameter bounds
    			var recvTParams []*TypeParam
    			if rname != nil {
    				// recv should be a Named type (otherwise an error is reported elsewhere)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/predicates.go

    	switch Unalias(t).(type) {
    	case *Basic, *Named, *TypeParam:
    		return true
    	}
    	return false
    }
    
    // isTypeLit reports whether t is a type literal.
    // This includes all non-defined types, but also basic types.
    // isTypeLit may be called with types that are not fully set up.
    func isTypeLit(t Type) bool {
    	switch Unalias(t).(type) {
    	case *Named, *TypeParam:
    		return false
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  5. src/go/types/predicates.go

    	switch Unalias(t).(type) {
    	case *Basic, *Named, *TypeParam:
    		return true
    	}
    	return false
    }
    
    // isTypeLit reports whether t is a type literal.
    // This includes all non-defined types, but also basic types.
    // isTypeLit may be called with types that are not fully set up.
    func isTypeLit(t Type) bool {
    	switch Unalias(t).(type) {
    	case *Named, *TypeParam:
    		return false
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  6. src/go/types/operand.go

    	origT := T
    	V := Unalias(x.typ)
    	T = Unalias(T)
    
    	// x's type is identical to T
    	if Identical(V, T) {
    		return true, 0
    	}
    
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// x is an untyped value representable by a value of type T.
    	if isUntyped(Vu) {
    		assert(Vp == nil)
    		if Tp != nil {
    			// T is a type parameter: x is assignable to T if it is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go

    	opTypeParam  = 'T' // .TypeParams.At(i) (Named, Signature)
    	opConstraint = 'C' // .Constraint()     (TypeParam)
    
    	// type->object operators
    	opAt     = 'A' // .At(i)		 (Tuple)
    	opField  = 'F' // .Field(i)	 (Struct)
    	opMethod = 'M' // .Method(i) (Named or Interface; not Struct: "promoted" names are ignored)
    	opObj    = 'O' // .Obj()		 (Named, TypeParam)
    )
    
    // For is equivalent to new(Encoder).For(obj).
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/operand.go

    	origT := T
    	V := Unalias(x.typ)
    	T = Unalias(T)
    
    	// x's type is identical to T
    	if Identical(V, T) {
    		return true, 0
    	}
    
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// x is an untyped value representable by a value of type T.
    	if isUntyped(Vu) {
    		assert(Vp == nil)
    		if Tp != nil {
    			// T is a type parameter: x is assignable to T if it is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. src/go/internal/gcimporter/ureader.go

    	// bounds is a slice of typeInfos corresponding to the underlying
    	// bounds of the element's type parameters.
    	bounds []typeInfo
    
    	// tparams is a slice of the constructed TypeParams for the element.
    	tparams []*types.TypeParam
    
    	// derived is a slice of types derived from tparams, which may be
    	// instantiated while reading the current element.
    	derived      []derivedInfo
    	derivedTypes []types.Type // lazily instantiated from derived
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go

    	case *types.Named:
    		hash := h.hashPtr(t.Obj())
    		targs := t.TypeArgs()
    		for i := 0; i < targs.Len(); i++ {
    			targ := targs.At(i)
    			hash += 2 * h.Hash(targ)
    		}
    		return hash
    
    	case *types.TypeParam:
    		return h.hashTypeParam(t)
    
    	case *types.Tuple:
    		return h.hashTuple(t)
    	}
    
    	panic(fmt.Sprintf("%T: %v", t, t))
    }
    
    func (h Hasher) hashTuple(tuple *types.Tuple) uint32 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 13.9K bytes
    - Viewed (0)
Back to top