- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for varType (0.5 sec)
-
src/cmd/compile/internal/types2/typexpr.go
func (check *Checker) typ(e syntax.Expr) Type { return check.definedType(e, nil) } // varType type-checks the type expression e and returns its type, or Typ[Invalid]. // The type must not be an (uninstantiated) generic type and it must not be a // constraint interface. func (check *Checker) varType(e syntax.Expr) Type { typ := check.definedType(e, nil) check.validVarType(e, typ) return typ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/go/types/typexpr.go
func (check *Checker) typ(e ast.Expr) Type { return check.definedType(e, nil) } // varType type-checks the type expression e and returns its type, or Typ[Invalid]. // The type must not be an (uninstantiated) generic type and it must not be a // constraint interface. func (check *Checker) varType(e ast.Expr) Type { typ := check.definedType(e, nil) check.validVarType(e, typ) return typ }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0) -
src/go/types/struct.go
// (go.dev/issue/25627). addInvalid := func(ident *ast.Ident) { typ = Typ[Invalid] tag = "" add(ident, true) } for _, f := range list.List { typ = check.varType(f.Type) tag = check.tag(f.Tag) if len(f.Names) > 0 { // named fields for _, name := range f.Names { add(name, false) } } else { // embedded field
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/struct.go
for i, f := range e.FieldList { // Fields declared syntactically with the same type (e.g.: a, b, c T) // share the same type expression. Only check type if it's a new type. if i == 0 || f.Type != prev { typ = check.varType(f.Type) prev = f.Type } tag = "" if i < len(e.TagList) { tag = check.tag(e.TagList[i]) } if f.Name != nil { // named field add(f.Name, false) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 6.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/signature.go
variadic = true } else { check.softErrorf(t, MisplacedDotDotDot, "can only use ... with final parameter in list") // ignore ... and continue } } typ = check.varType(ftype) } // The parser ensures that f.Tag is nil and we don't // care if a constructed AST contains a non-nil tag. if field.Name != nil { // named parameter name := field.Name.Value
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/go/types/index.go
switch x.mode { case invalid: check.use(e.Indices...) return false case typexpr: // type instantiation x.mode = invalid // TODO(gri) here we re-evaluate e.X - try to avoid this x.typ = check.varType(e.Orig) if isValid(x.typ) { x.mode = typexpr } return false case value: if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 { // function instantiation
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 16:17:05 UTC 2024 - 11.2K bytes - Viewed (0) -
src/go/types/builtins.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.2K bytes - Viewed (0) -
src/go/types/signature.go
variadic = true } else { check.softErrorf(t, MisplacedDotDotDot, "can only use ... with final parameter in list") // ignore ... and continue } } typ := check.varType(ftype) // The parser ensures that f.Tag is nil and we don't // care if a constructed AST contains a non-nil tag. if len(field.Names) > 0 { // named parameter for _, name := range field.Names {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 13K bytes - Viewed (0) -
src/go/types/stmt.go
// The spec allows the value nil instead of a type. if check.isNil(e) { T = nil check.expr(nil, &dummy, e) // run e through expr so we get the usual Info recordings } else { T = check.varType(e) if !isValid(T) { continue L } } // look for duplicate types // (quadratic algorithm, but type switches tend to be reasonably small) for t, other := range seen {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/builtins.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 27.1K bytes - Viewed (0)