]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix detection of duplicate cases for integer ranges
authorMatthew Dempsky <mdempsky@google.com>
Fri, 21 Oct 2016 21:43:59 +0000 (14:43 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 21 Oct 2016 22:55:28 +0000 (22:55 +0000)
commit6eede325ab9e444c19c8dc4fd5cc6c3603abb93c
tree8339f516df59bb16c985548630ad73ea70e2f041
parent28279238004da8e83e3d652b4bcd14d6795c6148
cmd/compile: fix detection of duplicate cases for integer ranges

Previously, the check to make sure we only considered constant cases
for duplicates was skipping past integer ranges, because those use
n.List instead of n.Left. Thanks to Emmanuel Odeke for investigating
and helping to identify the root cause.

Fixes #17517.

Change-Id: I46fcda8ed9c346ff3a9647d50b83f1555587b740
Reviewed-on: https://go-review.googlesource.com/31716
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/swt.go
test/switch5.go