- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for varType (0.55 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/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/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/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) -
src/cmd/compile/internal/types2/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.7K bytes - Viewed (0) -
src/go/types/expr.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
} check.initConst(obj, &x) } func (check *Checker) varDecl(obj *Var, lhs []*Var, typ, init syntax.Expr) { assert(obj.typ == nil) // determine type, if any if typ != nil { obj.typ = check.varType(typ) // We cannot spread the type to all lhs variables if there // are more than one since that would mark them as checked // (see Checker.objDecl) and the assignment of init exprs, // if any, would not be checked.
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/expr.go
// We have an "open" [...]T array type. // Create a new ArrayType with unknown length (-1) // and finish setting it up after analyzing the literal. typ = &Array{len: -1, elem: check.varType(atyp.Elem)} base = typ break } typ = check.typ(e.Type) base = typ case hint != nil: // no composite literal type present - use hint (element type of enclosing type)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 51.7K bytes - Viewed (0)