]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve errors for invalid conversions of consts
authorK. "pestophagous" Heller <pestophagous@gmail.com>
Wed, 21 Aug 2019 06:13:25 +0000 (23:13 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 6 Sep 2019 18:03:49 +0000 (18:03 +0000)
commit2da9c3e0f99b72cf8f3bdca01b57e7a68a546c5b
tree2f22aad40bf68c877c98b7550a64af4d3dead12f
parenta3ceb57fb4bfeb1af3558ff9999687b97fd08bc9
cmd/compile: improve errors for invalid conversions of consts

Follow-up to Change-Id: If6e52c59eab438599d641ecf6f110ebafca740a9

This addresses the remaining tech debt on issue 21979.

The aforementioned previous CL silenced one of two mostly redundant
compiler errors. However, the silenced error was the more expressive
error. This CL now imbues the surviving error with the same level
of expressiveness as the old semi-redundant error.

Fixes #21979

Change-Id: I3273d48c88bbab073fabe53421d801df621ce321
Reviewed-on: https://go-review.googlesource.com/c/go/+/191079
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/const.go
test/fixedbugs/issue21979.go [new file with mode: 0644]