- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for atPos (0.7 sec)
-
src/cmd/compile/internal/types2/typeset.go
check.later(func() { if pos.IsKnown() && !check.allowVersion(atPos(pos), go1_14) || !Identical(m.typ, other.Type()) { err := check.newError(DuplicateDecl) err.addf(atPos(pos), "duplicate method %s", m.name) err.addf(atPos(mpos[other.(*Func)]), "other declaration of method %s", m.name) err.report() } }).describef(atPos(pos), "duplicate method check for %s", m.name) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.6K bytes - Viewed (0) -
src/go/types/typeset.go
check.later(func() { if pos.IsValid() && !check.allowVersion(atPos(pos), go1_14) || !Identical(m.typ, other.Type()) { err := check.newError(DuplicateDecl) err.addf(atPos(pos), "duplicate method %s", m.name) err.addf(atPos(mpos[other.(*Func)]), "other declaration of method %s", m.name) err.report() } }).describef(atPos(pos), "duplicate method check for %s", m.name) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 13.7K bytes - Viewed (0) -
src/go/types/generate_test.go
n.Args[0] = arg return false } } } } return true }) } // fixAtPosCall updates calls of the form atPos(x) to x.Pos() in argument lists of (check).dump calls. // TODO(gri) can we avoid this and just use atPos consistently in go/types and types2? func fixAtPosCall(f *ast.File) { ast.Inspect(f, func(n ast.Node) bool { switch n := n.(type) { case *ast.CallExpr:
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/cmd/compile/internal/types2/instantiate.go
if constraint && comparable(V, true /* spec comparability */, nil, nil) { // V is comparable if we are at Go 1.20 or higher. if check == nil || check.allowVersion(atPos(pos), go1_20) { // atPos needed so that go/types generate passes return true } if cause != nil { *cause = check.sprintf("%s to %s comparable requires go1.20 or later", V, verb) } return false }
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/go/types/instantiate.go
if constraint && comparable(V, true /* spec comparability */, nil, nil) { // V is comparable if we are at Go 1.20 or higher. if check == nil || check.allowVersion(atPos(pos), go1_20) { // atPos needed so that go/types generate passes return true } if cause != nil { *cause = check.sprintf("%s to %s comparable requires go1.20 or later", V, verb) } return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 12.8K bytes - Viewed (0) -
src/go/types/call.go
// best position for error reporting pos := pos if i < len(xlist) { pos = xlist[i].Pos() } check.softErrorf(atPos(pos), InvalidTypeArg, "%s", err) } else { check.mono.recordInstance(check.pkg, pos, tparams, targs, xlist) } }).describef(atPos(pos), "verify instantiation") return inst } func (check *Checker) callExpr(x *operand, call *ast.CallExpr) exprKind {
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/go/types/stmt.go
sig: sig, } check.indent = 0 check.stmtList(0, body.List) if check.hasLabel { check.labels(body) } if sig.results.Len() > 0 && !check.isTerminating(body, "") { check.error(atPos(body.Rbrace), MissingReturn, "missing return") } // spec: "Implementation restriction: A compiler may make it illegal to // declare a variable inside a function body if the variable is never used." check.usage(sig.scope)
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/go/types/check.go
"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. // As of Apr 16 2024 they are used by default.
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/cmd/compile/internal/types2/builtins.go
// (no argument evaluated yet) if nargs == 0 { check.dump("%v: trace() without arguments", atPos(call)) x.mode = novalue break } var t operand x1 := x for _, arg := range argList { check.rawExpr(nil, x1, arg, nil, false) // permit trace for types, e.g.: new(trace(T)) check.dump("%v: %s", atPos(x1), x1) x1 = &t // use incoming x only for first argument } if x.mode == invalid {
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/go/types/decl.go
// the constant identifier position for any errors during // init expression evaluation since that is all we have // (see issues go.dev/issue/42991, go.dev/issue/42992). check.errpos = atPos(obj.pos) } check.expr(nil, &x, init) } check.initConst(obj, &x) } func (check *Checker) varDecl(obj *Var, lhs []*Var, typ, init ast.Expr) { assert(obj.typ == nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0)