Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 55 for TypeParam (0.38 sec)

  1. src/go/types/under.go

    // identical element types), the single underlying type is the restricted
    // channel type if the restrictions are always the same, or nil otherwise.
    func coreType(t Type) Type {
    	t = Unalias(t)
    	tpar, _ := t.(*TypeParam)
    	if tpar == nil {
    		return under(t)
    	}
    
    	var su Type
    	if tpar.underIs(func(u Type) bool {
    		if u == nil {
    			return false
    		}
    		if su != nil {
    			u = match(su, u)
    			if u == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go

    // NormalTerms returns a slice of terms representing the normalized structural
    // type restrictions of a type, if any.
    //
    // For all types other than *types.TypeParam, *types.Interface, and
    // *types.Union, this is just a single term with Tilde() == false and
    // Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see
    // below.
    //
    // Structural type restrictions of a type parameter are created via
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/under.go

    // identical element types), the single underlying type is the restricted
    // channel type if the restrictions are always the same, or nil otherwise.
    func coreType(t Type) Type {
    	t = Unalias(t)
    	tpar, _ := t.(*TypeParam)
    	if tpar == nil {
    		return under(t)
    	}
    
    	var su Type
    	if tpar.underIs(func(u Type) bool {
    		if u == nil {
    			return false
    		}
    		if su != nil {
    			u = match(su, u)
    			if u == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 22:34:27 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. src/go/types/type.go

    package types
    
    // A Type represents a type of Go.
    // All types implement the Type interface.
    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
    - 541 bytes
    - Viewed (0)
  5. src/go/types/badlinkname.go

    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname badlinkname_Checker_infer go/types.(*Checker).infer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 702 bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go

    		name += " (" + strings.Join(parentheticals, ", ") + ")"
    	}
    
    	return name
    }
    
    func typeName(t types.Type) string {
    	type hasTypeName interface{ Obj() *types.TypeName } // Alias, Named, TypeParam
    	switch t := t.(type) {
    	case *types.Basic:
    		return t.Name()
    	case hasTypeName:
    		return t.Obj().Name()
    	}
    	return ""
    }
    
    func run(pass *analysis.Pass) (interface{}, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  10. 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)
Back to top