Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for IsTypeParam (0.14 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/typeparams/common.go

    			Rbrack: rbrack,
    		}
    	default:
    		return &ast.IndexListExpr{
    			X:       x,
    			Lbrack:  lbrack,
    			Indices: indices,
    			Rbrack:  rbrack,
    		}
    	}
    }
    
    // IsTypeParam reports whether t is a type parameter (or an alias of one).
    func IsTypeParam(t types.Type) bool {
    	_, ok := aliases.Unalias(t).(*types.TypeParam)
    	return ok
    }
    
    // GenericAssignableTo is a generalization of types.AssignableTo that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. src/go/types/conversions.go

    	// and their pointer base types are not type parameters"
    	if V, ok := V.(*Pointer); ok {
    		if T, ok := T.(*Pointer); ok {
    			if IdenticalIgnoreTags(under(V.base), under(T.base)) && !isTypeParam(V.base) && !isTypeParam(T.base) {
    				return true
    			}
    		}
    	}
    
    	// "V and T are both integer or floating point types"
    	if isIntegerOrFloat(Vu) && isIntegerOrFloat(Tu) {
    		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/cmd/compile/internal/types2/predicates.go

    	return ok
    }
    
    // isNonTypeParamInterface reports whether t is an interface type but not a type parameter.
    func isNonTypeParamInterface(t Type) bool {
    	return !isTypeParam(t) && IsInterface(t)
    }
    
    // isTypeParam reports whether t is a type parameter.
    func isTypeParam(t Type) bool {
    	_, ok := Unalias(t).(*TypeParam)
    	return ok
    }
    
    // hasEmptyTypeset reports whether t is a type parameter with an empty type set.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/gcsizes.go

    		// Multiword data structures are effectively structs
    		// in which each element has size WordSize.
    		// Type parameters lead to variable sizes/alignments;
    		// StdSizes.Alignof won't be called for them.
    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    	case *TypeParam, *Union:
    		panic("unreachable")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. src/go/types/predicates.go

    	return ok
    }
    
    // isNonTypeParamInterface reports whether t is an interface type but not a type parameter.
    func isNonTypeParamInterface(t Type) bool {
    	return !isTypeParam(t) && IsInterface(t)
    }
    
    // isTypeParam reports whether t is a type parameter.
    func isTypeParam(t Type) bool {
    	_, ok := Unalias(t).(*TypeParam)
    	return ok
    }
    
    // hasEmptyTypeset reports whether t is a type parameter with an empty type set.
    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/gcsizes.go

    		// Multiword data structures are effectively structs
    		// in which each element has size WordSize.
    		// Type parameters lead to variable sizes/alignments;
    		// StdSizes.Alignof won't be called for them.
    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    	case *TypeParam, *Union:
    		panic("unreachable")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/conversions.go

    	// and their pointer base types are not type parameters"
    	if V, ok := V.(*Pointer); ok {
    		if T, ok := T.(*Pointer); ok {
    			if IdenticalIgnoreTags(under(V.base), under(T.base)) && !isTypeParam(V.base) && !isTypeParam(T.base) {
    				return true
    			}
    		}
    	}
    
    	// "V and T are both integer or floating point types"
    	if isIntegerOrFloat(Vu) && isIntegerOrFloat(Tu) {
    		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)
  8. src/go/types/builtins.go

    		S := x.typ
    		var T Type
    		if s, _ := coreType(S).(*Slice); s != nil {
    			T = s.elem
    		} else {
    			var cause string
    			switch {
    			case x.isNil():
    				cause = "have untyped nil"
    			case isTypeParam(S):
    				if u := coreType(S); u != nil {
    					cause = check.sprintf("%s has core type %s", x, u)
    				} else {
    					cause = check.sprintf("%s has no core type", x)
    				}
    			default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  9. src/go/types/sizes.go

    		// Multiword data structures are effectively structs
    		// in which each element has size WordSize.
    		// Type parameters lead to variable sizes/alignments;
    		// StdSizes.Alignof won't be called for them.
    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    	case *TypeParam, *Union:
    		panic("unreachable")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/sizes.go

    		// Multiword data structures are effectively structs
    		// in which each element has size WordSize.
    		// Type parameters lead to variable sizes/alignments;
    		// StdSizes.Alignof won't be called for them.
    		assert(!isTypeParam(T))
    		return s.WordSize
    	case *Basic:
    		// Strings are like slices and interfaces.
    		if t.Info()&IsString != 0 {
    			return s.WordSize
    		}
    	case *TypeParam, *Union:
    		panic("unreachable")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 8.8K bytes
    - Viewed (0)
Back to top