- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 89 for TypeParam (0.14 sec)
-
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) -
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) -
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) -
src/cmd/compile/internal/types2/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: Thu Feb 22 19:32:17 UTC 2024 - 4.2K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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)