Commit b0680b47 authored by griesemer's avatar griesemer Committed by Robert Griesemer

go/types: add test verifying corner-case behavior of iota

For #22341.

Change-Id: I7e586c58075e4c835ef97701db2f38bdf7558521
Reviewed-on: https://go-review.googlesource.com/71974
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 85177f42
......@@ -118,6 +118,8 @@ func TestValuesInfo(t *testing.T) {
{`package f7a; var _ complex128 = -1e-2000i`, `-1e-2000i`, `complex128`, `(0 + 0i)`},
{`package f6b; var _ = 1e-2000i`, `1e-2000i`, `complex128`, `(0 + 0i)`},
{`package f7b; var _ = -1e-2000i`, `-1e-2000i`, `complex128`, `(0 + 0i)`},
{`package g0; const (a = len([iota]int{}); b; c); const _ = c`, `c`, `int`, `2`}, // issue #22341
}
for _, test := range tests {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment