mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
test: expand switch dead code test to include a range
Change-Id: If443ffb50b140c466dcf4cc5340f44948bfa46a9 Reviewed-on: https://go-review.googlesource.com/26765 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
cd5ab97986
commit
1a3006b035
|
@ -67,6 +67,15 @@ func init() {
|
|||
case true:
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue