blob: 92c90251dc0356a020447ff727d1a62389fcdbaa (
plain) (
blame)
1
2
3
4
5
|
// expect error: a switch has one
// spec 4.7.1: default and _ are the same thing, so a switch can have only one of them
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int k = 1; switch (k) { default: pn(1); case _: pn(2); } return 0; }
|