Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 55 for TypeParam (0.17 sec)

  1. src/cmd/compile/internal/types2/alias.go

    func (a *Alias) String() string { return TypeString(a, nil) }
    
    // Underlying returns the [underlying type] of the alias type a, which is the
    // underlying type of the aliased type. Underlying types are never Named,
    // TypeParam, or Alias types.
    //
    // [underlying type]: https://go.dev/ref/spec#Underlying_types.
    func (a *Alias) Underlying() Type { return unalias(a).Underlying() }
    
    // Origin returns the generic Alias type of which a is an instance.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. src/go/types/conversions.go

    	if ok, _ := x.assignableTo(check, T, cause); ok {
    		return true
    	}
    
    	origT := T
    	V := Unalias(x.typ)
    	T = Unalias(T)
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// "V and T have identical underlying types if tags are ignored
    	// and V and T are not type parameters"
    	if IdenticalIgnoreTags(Vu, Tu) && Vp == nil && Tp == nil {
    		return true
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  3. src/go/types/alias.go

    func (a *Alias) String() string { return TypeString(a, nil) }
    
    // Underlying returns the [underlying type] of the alias type a, which is the
    // underlying type of the aliased type. Underlying types are never Named,
    // TypeParam, or Alias types.
    //
    // [underlying type]: https://go.dev/ref/spec#Underlying_types.
    func (a *Alias) Underlying() Type { return unalias(a).Underlying() }
    
    // Origin returns the generic Alias type of which a is an instance.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/conversions.go

    	if ok, _ := x.assignableTo(check, T, cause); ok {
    		return true
    	}
    
    	origT := T
    	V := Unalias(x.typ)
    	T = Unalias(T)
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// "V and T have identical underlying types if tags are ignored
    	// and V and T are not type parameters"
    	if IdenticalIgnoreTags(Vu, Tu) && Vp == nil && Tp == nil {
    		return true
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/type.go

    // so we could depend on it from other packages without
    // introducing an import cycle.)
    type Type interface {
    	// Underlying returns the underlying type of a type.
    	// Underlying types are never Named, TypeParam, or Alias types.
    	//
    	// See https://go.dev/ref/spec#Underlying_types.
    	Underlying() Type
    
    	// String returns a string representation of a type.
    	String() string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/cmd/compile/internal/types2/format.go

    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    			buf.WriteByte(']')
    			arg = buf.String()
    		case []*TypeParam:
    			var buf bytes.Buffer
    			w := newTypeWriter(&buf, qf)
    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. src/go/types/format.go

    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    			buf.WriteByte(']')
    			arg = buf.String()
    		case []*TypeParam:
    			var buf bytes.Buffer
    			w := newTypeWriter(&buf, qf)
    			w.tpSubscripts = tpSubscripts
    			buf.WriteByte('[')
    			for i, x := range a {
    				if i > 0 {
    					buf.WriteString(", ")
    				}
    				w.typ(x)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. src/go/types/typestring.go

    		} else if w.ctxt == nil && t.TypeParams().Len() != 0 { // For type hashing, don't need to format the TypeParams
    			// parameterized type
    			w.tParamList(t.TypeParams().list())
    		}
    
    	case *TypeParam:
    		if t.obj == nil {
    			w.error("unnamed type parameter")
    			break
    		}
    		if i := tparamIndex(w.tparams.list(), t); i >= 0 {
    			// The names of type parameters that are declared by the type being
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
Back to top