- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for atPos (0.09 sec)
-
src/cmd/compile/internal/types2/errors.go
msg := check.sprintf(format, args...) err := check.newError(UnsupportedFeature) err.addf(at, "%s requires %s or later", msg, v) err.report() } // atPos reports the left (= start) position of at. func atPos(at poser) syntax.Pos { switch x := at.(type) { case *operand: if x.expr != nil { return syntax.StartPos(x.expr) } case syntax.Node: return syntax.StartPos(x) }
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/go/types/errors.go
msg := check.sprintf(format, args...) err := check.newError(UnsupportedFeature) err.addf(at, "%s requires %s or later", msg, v) err.report() } // atPos wraps a token.Pos to implement the positioner interface. type atPos token.Pos func (s atPos) Pos() token.Pos { return token.Pos(s) } // posSpan holds a position range along with a highlighted position within that
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/const.go
// TODO(gri) We should report exactly what went wrong. At the // moment we don't have the (go/constant) API for that. // See also TODO in go/constant/value.go. check.error(atPos(opPos), InvalidConstVal, "constant result is not representable") return } // Typed constants must be representable in // their type after each constant operation. // x.typ cannot be a type parameter (type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 7.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/const.go
// TODO(gri) We should report exactly what went wrong. At the // moment we don't have the (go/constant) API for that. // See also TODO in go/constant/value.go. check.error(atPos(opPos), InvalidConstVal, "constant result is not representable") return } // Typed constants must be representable in // their type after each constant operation. // x.typ cannot be a type parameter (type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 7.5K bytes - Viewed (0) -
src/go/types/util.go
func hasDots(call *ast.CallExpr) bool { return call.Ellipsis.IsValid() } // dddErrPos returns the positioner for reporting an invalid ... use in a call. func dddErrPos(call *ast.CallExpr) positioner { return atPos(call.Ellipsis) } // argErrPos returns positioner for reporting an invalid argument count. func argErrPos(call *ast.CallExpr) positioner { return inNode(call, call.Rparen) } // startPos returns the start position of node n.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:01:18 UTC 2024 - 1.7K bytes - Viewed (0) -
src/go/types/mono.go
switch obj.Type().(type) { default: panic("unexpected type") case *Named: err.addf(atPos(edge.pos), "%s implicitly parameterized by %s", obj.Name(), TypeString(edge.typ, qf)) // secondary error, \t indented case *TypeParam: err.addf(atPos(edge.pos), "%s instantiated as %s", obj.Name(), TypeString(edge.typ, qf)) // secondary error, \t indented } } err.report() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 9.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/mono.go
switch obj.Type().(type) { default: panic("unexpected type") case *Named: err.addf(atPos(edge.pos), "%s implicitly parameterized by %s", obj.Name(), TypeString(edge.typ, qf)) // secondary error, \t indented case *TypeParam: err.addf(atPos(edge.pos), "%s instantiated as %s", obj.Name(), TypeString(edge.typ, qf)) // secondary error, \t indented } } err.report() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 28 00:05:29 UTC 2024 - 9.1K bytes - Viewed (0) -
src/go/types/struct.go
return nil // invalid embedded field } func (check *Checker) declareInSet(oset *objset, pos token.Pos, obj Object) bool { if alt := oset.insert(obj); alt != nil { err := check.newError(DuplicateDecl) err.addf(atPos(pos), "%s redeclared", obj.Name()) err.addAltDecl(alt) err.report() return false } return true } func (check *Checker) tag(t *ast.BasicLit) string { if t != nil {
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/interface.go
if ityp.embedPos == nil { ityp.embedPos = new([]syntax.Pos) } *ityp.embedPos = append(*ityp.embedPos, pos) } for _, f := range iface.MethodList { if f.Name == nil { addEmbedded(atPos(f.Type), parseUnion(check, f.Type)) continue } // f.Name != nil // We have a method with name f.Name. name := f.Name.Value if name == "_" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 09 17:24:42 UTC 2023 - 6.2K bytes - Viewed (0)