- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 66 for parameters (0.79 sec)
-
src/cmd/compile/internal/types2/infer.go
} return false } // renameTParams renames the type parameters in the given type such that each type // parameter is given a new identity. renameTParams returns the new type parameters // and updated type. If the result type is unchanged from the argument type, none // of the type parameters in tparams occurred in the type. // If typ is a generic function, type parameters held with typ are not changed and
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 13:54:20 UTC 2024 - 26.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/unify.go
// [p, q, ...] ➞ [x, y, ...] mapping from type parameters to types traceInference = false ) // A unifier maintains a list of type parameters and // corresponding types inferred for each type parameter. // A unifier is created by calling newUnifier. type unifier struct { // handles maps each type parameter to its inferred type through // an indirection *Type called (inferred type) "handle".
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 16:24:39 UTC 2024 - 27.8K bytes - Viewed (0) -
src/cmd/compile/internal/types2/instantiate.go
// This file implements instantiation of generic types // through substitution of type parameters by type arguments. package types2 import ( "cmd/compile/internal/syntax" "errors" "fmt" . "internal/types/errors" ) // A genericType implements access to its type parameters. type genericType interface { Type TypeParams() *TypeParamList }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/alias.go
func (a *Alias) Origin() *Alias { return a.orig } // TypeParams returns the type parameters of the alias type a, or nil. // A generic Alias and its instances have the same type parameters. func (a *Alias) TypeParams() *TypeParamList { return a.tparams } // SetTypeParams sets the type parameters of the alias type a. // The alias a must not have type arguments. func (a *Alias) SetTypeParams(tparams []*TypeParam) {
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/compile/internal/types2/named.go
} return (*Checker)(nil).newNamed(obj, underlying, methods) } // resolve resolves the type parameters, methods, and underlying type of n. // This information may be loaded from a provided loader function, or computed // from an origin type (in the case of instances). // // After resolution, the type parameters, methods, and underlying type of n are // accessible; but if n is an instantiated type, its methods may still be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 20:03:31 UTC 2024 - 23.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/signature.go
variadic bool // true if the last parameter's type is of the form ...T (or string, for append built-in only) } // NewSignatureType creates a new function type for the given receiver, // receiver type parameters, type parameters, parameters, and results. If // variadic is set, params must hold at least one parameter and the last // parameter's core type must be of unnamed slice or bytestring type.
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/compile/internal/types2/predicates.go
return false } // Two function types are identical if they have the same number of // parameters and result values, corresponding parameter and result types // are identical, and either both functions are variadic or neither is. // Parameter and result names are not required to match, and type // parameters are considered identical modulo renaming. if x.TypeParams().Len() != y.TypeParams().Len() { return false
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/cmd/compile/internal/types2/call.go
_ = len(genericArgs) > 0 && check.verifyVersionf(args[genericArgs[0]], go1_21, "implicitly instantiated function as argument") // tparams holds the type parameters of the callee and generic function arguments, if any: // the first n type parameters belong to the callee, followed by mi type parameters for each // of the generic function arguments, where mi = args[i].typ.(*Signature).TypeParams().Len().
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
check.error(tdecl.Type, MisplacedTypeParam, "cannot use a type parameter as RHS in type declaration") named.underlying = Typ[Invalid] } } func (check *Checker) collectTypeParams(dst **TypeParamList, list []*syntax.Field) { tparams := make([]*TypeParam, len(list)) // Declare type parameters up-front. // The scope of type parameters starts at the beginning of the type parameter
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typeparam.go
} // NewTypeParam returns a new TypeParam. Type parameters may be set on a Named // or Signature type by calling SetTypeParams. Setting a type parameter on more // than one type will result in a panic. // // The constraint argument can be nil, and set later via SetConstraint. If the // constraint is non-nil, it must be fully defined. func NewTypeParam(obj *TypeName, constraint Type) *TypeParam {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 20:03:31 UTC 2024 - 4.9K bytes - Viewed (0)