diff options
author | Robert Griesemer <gri@golang.org> | 2020-11-19 18:00:13 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2020-11-20 02:27:53 +0000 |
commit | 0dcc7d6ea868551e70323e2ca0b63a79ad2217fd (patch) | |
tree | 80afd1a276fd9996e578e9ca0bf5435641c6aaaa /src/go/types/expr.go | |
parent | c72a44888174947dfb010a636d89dc8bdd61183c (diff) | |
download | go-0dcc7d6ea868551e70323e2ca0b63a79ad2217fd.tar.gz go-0dcc7d6ea868551e70323e2ca0b63a79ad2217fd.zip |
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>
Diffstat (limited to 'src/go/types/expr.go')
-rw-r--r-- | src/go/types/expr.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/go/types/expr.go b/src/go/types/expr.go index 4e19f30477..eb2056125a 100644 --- a/src/go/types/expr.go +++ b/src/go/types/expr.go @@ -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 // moment we don't have the (go/constant) API for that. // 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? } // Typed constants must be representable in |