From: Robert Griesemer Date: Fri, 20 Nov 2020 00:38:11 +0000 (-0800) Subject: go/types: fix error message for consistency X-Git-Tag: go1.16beta1~191 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c72a448881;p=gostls13.git go/types: fix error message for consistency Follow-up on https://golang.org/cl/271706 . (Missed a review comment.) Change-Id: Ibff542f43d721600a2452907c0a20941961e793f Reviewed-on: https://go-review.googlesource.com/c/go/+/271766 Trust: Robert Griesemer Run-TryBot: Robert Griesemer Reviewed-by: Robert Findley TryBot-Result: Go Bot --- diff --git a/src/go/types/expr.go b/src/go/types/expr.go index 5bf9c81460..4e19f30477 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 not representable") + check.errorf(atPos(e.OpPos), _InvalidConstVal, "constant result is not representable") // TODO(gri) Should we mark operands with unknown values as invalid? } // Typed constants must be representable in