// expected: duplicate case in switch // // Two case clauses with the same constant value can never both run. go/types // rejects it on the legacy side; stage4 compiled the second clause silently. // Values written differently (1 and 0x1) are the same case. package main const K = 2 func main() { x := int32(1) switch x { case 1: println(1) case 0x1: println(2) case K: println(3) case 2: println(4) } }