| 1 | comptime { |
| 2 | const x = switch (true) { |
| 3 | true => false, |
| 4 | false => true, |
| 5 | true => false, |
| 6 | }; |
| 7 | _ = x; |
| 8 | } |
| 9 | comptime { |
| 10 | const x = switch (true) { |
| 11 | false => true, |
| 12 | true => false, |
| 13 | false => true, |
| 14 | }; |
| 15 | _ = x; |
| 16 | } |
| 17 | |
| 18 | // error |
| 19 | // |
| 20 | // :5:9: error: duplicate switch value 'true' |
| 21 | // :3:9: note: previous value here |
| 22 | // :13:9: error: duplicate switch value 'false' |
| 23 | // :11:9: note: previous value here |