aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/switch_same_label_other_switch.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conformance/4-statements/switch_same_label_other_switch.zc')
-rw-r--r--tests/conformance/4-statements/switch_same_label_other_switch.zc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/conformance/4-statements/switch_same_label_other_switch.zc b/tests/conformance/4-statements/switch_same_label_other_switch.zc
new file mode 100644
index 0000000..bb52a94
--- /dev/null
+++ b/tests/conformance/4-statements/switch_same_label_other_switch.zc
@@ -0,0 +1,5 @@
+// expect: 2/
+// spec 4.7.2: equal labels in two different switches are fine
+include rt;
+fn main() { int k = 1; switch (k) { case 1: k = 2; } switch (k) { case 1: k = 9; case 2: rt.put_n(k); } rt.put_c(10); return 0; }
+// zc0: skip