blob: afc5f2b258cc3ca88cc4632a4252320bcc2a5845 (
plain) (
blame)
1
2
3
4
5
|
// expect error: a switch has one catch-all case
// spec 4.7.1
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int k = 1; switch (k) { case _: pn(1); case _: pn(2); } return 0; }
|