mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
go/types: use correct error position
Follow-up on https://golang.org/cl/271706 . Change-Id: I90339987aed88b0de3ee7ebe7d413282055c260c Reviewed-on: https://go-review.googlesource.com/c/go/+/271789 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
c72a448881
commit
0dcc7d6ea8
1 changed files with 1 additions and 1 deletions
|
|
@ -890,7 +890,7 @@ func (check *Checker) binary(x *operand, e *ast.BinaryExpr, lhs, rhs ast.Expr, o
|
||||||
// TODO(gri) We should report exactly what went wrong. At the
|
// TODO(gri) We should report exactly what went wrong. At the
|
||||||
// moment we don't have the (go/constant) API for that.
|
// moment we don't have the (go/constant) API for that.
|
||||||
// See also TODO in go/constant/value.go.
|
// See also TODO in go/constant/value.go.
|
||||||
check.errorf(atPos(e.OpPos), _InvalidConstVal, "constant result is not representable")
|
check.errorf(atPos(opPos), _InvalidConstVal, "constant result is not representable")
|
||||||
// TODO(gri) Should we mark operands with unknown values as invalid?
|
// TODO(gri) Should we mark operands with unknown values as invalid?
|
||||||
}
|
}
|
||||||
// Typed constants must be representable in
|
// Typed constants must be representable in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue