- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 89 for TypeParam (0.15 sec)
-
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) -
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) -
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) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/internal/facts/imports.go
// by obtaining it from the internals of the gcexportdata decoder. func importMap(imports []*types.Package) map[string]*types.Package { objects := make(map[types.Object]bool) typs := make(map[types.Type]bool) // Named and TypeParam packages := make(map[string]*types.Package) var addObj func(obj types.Object) var addType func(T types.Type) addObj = func(obj types.Object) { if !objects[obj] { objects[obj] = true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.5K bytes - Viewed (0) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/composite/composite.go
typeName := typ.String() if whitelist && unkeyedLiteral[typeName] { // skip whitelisted types return } var structuralTypes []types.Type switch typ := aliases.Unalias(typ).(type) { case *types.TypeParam: terms, err := typeparams.StructuralTerms(typ) if err != nil { return // invalid type } for _, term := range terms { structuralTypes = append(structuralTypes, term.Type()) } default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 4.4K bytes - Viewed (0) -
src/go/types/gcsizes.go
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") } a := s.Sizeof(T) // may be 0 or negative // spec: "For a variable x of any type: unsafe.Alignof(x) is at least 1." if a < 1 { return 1 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 4.4K bytes - Viewed (0)