From: Russ Cox Date: Tue, 17 Nov 2015 21:34:06 +0000 (-0500) Subject: cmd/compile: fix Val vs Opt collision X-Git-Tag: go1.6beta1~397 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=918a2644f2ba67af43cfab201bc4c3f41f8bfeb7;p=gostls13.git 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 --- diff --git a/src/cmd/compile/internal/gc/const.go b/src/cmd/compile/internal/gc/const.go index 03c52a078c..bb42468713 100644 --- a/src/cmd/compile/internal/gc/const.go +++ b/src/cmd/compile/internal/gc/const.go @@ -1305,20 +1305,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<