- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 215 for noposn (0.1 sec)
-
src/go/types/errors_test.go
if got := err.msg(); got != want { t.Errorf("empty error: got %q, want %q", got, want) } want = "foo 42" err.addf(noposn, "foo %d", 42) if got := err.msg(); got != want { t.Errorf("simple error: got %q, want %q", got, want) } want = "foo 42\n\tbar 43" err.addf(noposn, "bar %d", 43) if got := err.msg(); got != want { t.Errorf("simple error: got %q, want %q", got, want) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 1.1K bytes - Viewed (0) -
src/go/types/generate_test.go
fun := &ast.SelectorExpr{X: newIdent(pos, "posn"), Sel: newIdent(pos, "Pos")} arg := &ast.CallExpr{Fun: fun, Lparen: pos, Args: nil, Ellipsis: token.NoPos, Rparen: pos} n.Args[0] = arg return false } case "addf": // rewrite err.addf(pos, ...) to err.addf(posn, ...) if isIdent(n.Args[0], "pos") { pos := n.Args[0].Pos() arg := newIdent(pos, "posn") n.Args[0] = arg
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 16.5K bytes - Viewed (0) -
src/go/types/errors.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 8.5K bytes - Viewed (0) -
src/go/types/assignments.go
} else if r > 0 { at = rhs[r-1] // report at last value } err := check.newError(WrongResultCount) err.addf(at, "%s return values", qualifier) err.addf(noposn, "have %s", check.typesSummary(operandTypes(rhs), false)) err.addf(noposn, "want %s", check.typesSummary(varTypes(lhs), false)) err.report() } // initVars type-checks assignments of initialization expressions orig_rhs // to variables lhs.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 16.4K bytes - Viewed (0) -
src/go/types/check.go
package types import ( "fmt" "go/ast" "go/constant" "go/token" "internal/godebug" . "internal/types/errors" "strings" "sync/atomic" ) // nopos, noposn indicate an unknown position var nopos token.Pos var noposn = atPos(nopos) // debugging/development support const debug = false // leave on during development // gotypesalias controls the use of Alias types.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 23.1K bytes - Viewed (0) -
src/go/types/call.go
if sig.params != nil { params = sig.params.vars } err := check.newError(WrongArgCount) err.addf(at, "%s arguments in call to %s", qualifier, call.Fun) err.addf(noposn, "have %s", check.typesSummary(operandTypes(args), false)) err.addf(noposn, "want %s", check.typesSummary(varTypes(params), sig.variadic)) err.report() return } // collect type parameters of callee and generic function arguments
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/internal/src/xpos_test.go
func TestNoXPos(t *testing.T) { var tab PosTable if tab.Pos(NoXPos) != NoPos { t.Errorf("failed to translate NoXPos to Pos using zero PosTable") } } func TestConversion(t *testing.T) { b1 := NewFileBase("b1", "b1") b2 := NewFileBase("b2", "b2") b3 := NewLinePragmaBase(MakePos(b1, 10, 0), "b3", "b3", 123, 0) var tab PosTable for _, want := range []Pos{ NoPos, MakePos(nil, 0, 0), // same table entry as NoPos
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 2.7K bytes - Viewed (0) -
src/cmd/compile/internal/types2/object_test.go
} // various other types pkg := NewPackage("p", "p") t1 := NewTypeName(nopos, pkg, "t1", nil) n1 := NewNamed(t1, new(Struct), nil) t5 := NewTypeName(nopos, pkg, "t5", nil) NewTypeParam(t5, nil) for _, test := range []struct { name *TypeName alias bool }{ {NewTypeName(nopos, nil, "t0", nil), false}, // no type yet {NewTypeName(nopos, pkg, "t0", nil), false}, // no type yet
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 5.2K bytes - Viewed (0) -
src/go/types/object_test.go
} // various other types pkg := NewPackage("p", "p") t1 := NewTypeName(nopos, pkg, "t1", nil) n1 := NewNamed(t1, new(Struct), nil) t5 := NewTypeName(nopos, pkg, "t5", nil) NewTypeParam(t5, nil) for _, test := range []struct { name *TypeName alias bool }{ {NewTypeName(nopos, nil, "t0", nil), false}, // no type yet {NewTypeName(nopos, pkg, "t0", nil), false}, // no type yet
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 5.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/universe.go
recv := NewVar(nopos, nil, "", typ) res := NewVar(nopos, nil, "", Typ[String]) sig := NewSignatureType(recv, nil, nil, nil, NewTuple(res), false) err := NewFunc(nopos, nil, "Error", sig) // interface{ Error() string } ityp := &Interface{methods: []*Func{err}, complete: true} computeInterfaceTypeSet(nil, nopos, ityp) // prevent races due to lazy computation of tset typ.SetUnderlying(ityp) def(obj)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 9.1K bytes - Viewed (0)