- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 34 for NewVar (0.13 sec)
-
src/cmd/compile/internal/types2/builtins.go
func makeSig(res Type, args ...Type) *Signature { list := make([]*Var, len(args)) for i, param := range args { list[i] = NewVar(nopos, nil, "", Default(param)) } params := NewTuple(list...) var result *Tuple if res != nil { assert(!isUntyped(res)) result = NewTuple(NewVar(nopos, nil, "", res)) } return &Signature{params: params, results: result} }
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/call.go
} else { check.versionErrorf(instErrPos, go1_21, "implicitly instantiated function in assignment") } } gsig := NewSignatureType(nil, nil, nil, sig.params, sig.results, sig.variadic) params = []*Var{NewVar(x.Pos(), check.pkg, "", gsig)} // The type of the argument operand is tsig, which is the type of the LHS in an assignment // or the result type in a return statement. Create a pseudo-expression for that operand
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/go/types/call.go
} else { check.versionErrorf(instErrPos, go1_21, "implicitly instantiated function in assignment") } } gsig := NewSignatureType(nil, nil, nil, sig.params, sig.results, sig.variadic) params = []*Var{NewVar(x.Pos(), check.pkg, "", gsig)} // The type of the argument operand is tsig, which is the type of the LHS in an assignment // or the result type in a return statement. Create a pseudo-expression for that operand
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/resolver.go
d1 = &declInfo{file: fileScope, lhs: lhs, vtyp: s.Type, init: s.Values} } // declare all variables values := syntax.UnpackListExpr(s.Values) for i, name := range s.NameList { obj := NewVar(name.Pos(), pkg, name.Value, nil) lhs[i] = obj d := d1 if d == nil { // individual assignments var init syntax.Expr if i < len(values) { init = values[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/go/types/resolver.go
// for a later phase. d1 = &declInfo{file: fileScope, lhs: lhs, vtyp: d.spec.Type, init: d.spec.Values[0]} } // declare all variables for i, name := range d.spec.Names { obj := NewVar(name.Pos(), pkg, name.Name, nil) lhs[i] = obj di := d1 if di == nil { // individual assignments var init ast.Expr if i < len(d.spec.Values) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
check.declare(check.scope, name, lhs[i], scopePos) } case *syntax.VarDecl: top := len(check.delayed) lhs0 := make([]*Var, len(s.NameList)) for i, name := range s.NameList { lhs0[i] = NewVar(name.Pos(), pkg, name.Value, nil) } // initialize all variables values := syntax.UnpackListExpr(s.Values) for i, obj := range lhs0 { var lhs []*Var var init syntax.Expr
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/go/types/issues_test.go
t.Error("comparable not assignable to any") } } func TestIssue55030(t *testing.T) { // makeSig makes the signature func(typ...) makeSig := func(typ Type) { par := NewVar(nopos, nil, "", typ) params := NewTuple(par) NewSignatureType(nil, nil, nil, params, nil, true) } // makeSig must not panic for the following (example) types: // []int makeSig(NewSlice(Typ[Int]))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/issues_test.go
t.Error("comparable not assignable to any") } } func TestIssue55030(t *testing.T) { // makeSig makes the signature func(typ...) makeSig := func(typ Type) { par := NewVar(nopos, nil, "", typ) params := NewTuple(par) NewSignatureType(nil, nil, nil, params, nil, true) } // makeSig must not panic for the following (example) types: // []int makeSig(NewSlice(Typ[Int]))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/go/internal/gccgoimporter/parser.go
} param = types.NewParam(token.NoPos, pkg, name, typ) return } // Var = Name Type . func (p *parser) parseVar(pkg *types.Package) *types.Var { name := p.parseName() v := types.NewVar(token.NoPos, pkg, name, p.parseType(pkg)) if name[0] == '.' || name[0] == '<' { // This is an unexported variable, // or a variable defined in a different package. // We only want to record exported variables.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 02 23:14:07 UTC 2024 - 31.2K bytes - Viewed (0) -
src/go/types/decl.go
check.declare(check.scope, name, lhs[i], scopePos) } case varDecl: top := len(check.delayed) lhs0 := make([]*Var, len(d.spec.Names)) for i, name := range d.spec.Names { lhs0[i] = NewVar(name.Pos(), pkg, name.Name, nil) } // initialize all variables for i, obj := range lhs0 { var lhs []*Var var init ast.Expr switch len(d.spec.Values) { case len(d.spec.Names):
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0)