- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 101 for TypeParam (0.16 sec)
-
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/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/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) -
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) -
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) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go
return // not enough arguments, e.g. called with return values of another function } t := pass.TypesInfo.Types[call.Args[argidx]].Type switch t.Underlying().(type) { case *types.Pointer, *types.Interface, *types.TypeParam: return } switch argidx { case 0: pass.Reportf(call.Lparen, "call of %s passes non-pointer", fn.Name()) case 1:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.1K bytes - Viewed (0)