Commit 1a3006b0 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder Committed by Brad Fitzpatrick

test: expand switch dead code test to include a range

Change-Id: If443ffb50b140c466dcf4cc5340f44948bfa46a9
Reviewed-on: https://go-review.googlesource.com/26765Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent cd5ab979
...@@ -67,6 +67,15 @@ func init() { ...@@ -67,6 +67,15 @@ func init() {
case true: case true:
fail() fail()
} }
// Test dead code elimination in large ranges.
switch 5 {
case 3, 4, 5, 6, 7:
case 0, 1, 2:
fail()
default:
fail()
}
} }
func main() { func main() {
......
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