]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: fix error message for consistency
authorRobert Griesemer <gri@golang.org>
Fri, 20 Nov 2020 00:38:11 +0000 (16:38 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 20 Nov 2020 00:54:43 +0000 (00:54 +0000)
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 <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/go/types/expr.go

index 5bf9c814603cbe4e488679527795786ee48fba31..4e19f304772791f261e0f25eca2e0ef1d550f49f 100644 (file)
@@ -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