Skip to content

Commit

Permalink
go/types: fix error message for consistency
Browse files Browse the repository at this point in the history
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 <[email protected]>
Run-TryBot: Robert Griesemer <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
TryBot-Result: Go Bot <[email protected]>
  • Loading branch information
griesemer committed Nov 20, 2020
1 parent 7eed73f commit c72a448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/go/types/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c72a448

Please sign in to comment.