From: Russ Cox Date: Tue, 17 Nov 2015 21:34:06 +0000 (-0500) Subject: [release-branch.go1.5] cmd/compile: fix Val vs Opt collision X-Git-Tag: go1.5.2~17 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=29a22abfc8c81be7c3676f385fb0f2caf3029543;p=gostls13.git [release-branch.go1.5] cmd/compile: fix Val vs Opt collision Fixes #12686. Change-Id: I7a9f49dbd1f60b1d0240de57787753b425f9548c Reviewed-on: https://go-review.googlesource.com/17031 Reviewed-by: Ian Lance Taylor Reviewed-on: https://go-review.googlesource.com/17124 --- diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go index 9eb4983606..5095e5ebd9 100644 --- a/src/cmd/compile/internal/gc/const.go +++ b/src/cmd/compile/internal/gc/const.go @@ -1279,20 +1279,28 @@ func defaultlit(np **Node, t *Type) { return num: + // Note: n.Val().Ctype() can be CTxxx (not a constant) here + // in the case of an untyped non-constant value, like 1<