blob: 16bc31fee9ea66964ae81b0c54e9d66199a39eed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
// expect: 5/6/
// spec 4.7.2: the statements of a case form their own block
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
void t(int k) {
switch (k) {
case 1: int x = 5; pn(x);
case 2: int x = 6; pn(x);
}
}
fn main() { t(1); t(2); return 0; }
|