summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-05-30 11:01:13 -0400
committerOri Bernstein <ori@eigenstate.org>2013-05-30 11:02:05 -0400
commitc62d3368c31deeb95c7638f6487ccbdbbb536afa (patch)
tree20e1b434a8dfd1392d242cb937b8bdf9e327390a
parente01e8d1bd5f6412dedd7370b7e2ce1d55f7b7eee (diff)
downloadmc-c62d3368c31deeb95c7638f6487ccbdbbb536afa.tar.gz
Add test for properly scoped labels.
-rw-r--r--test/local-labels.myr15
-rw-r--r--test/tests1
2 files changed, 16 insertions, 0 deletions
diff --git a/test/local-labels.myr b/test/local-labels.myr
new file mode 100644
index 0000000..14ed601
--- /dev/null
+++ b/test/local-labels.myr
@@ -0,0 +1,15 @@
+use std
+
+const main = {
+ goto foo
+ -> 123
+:foo
+ -> bar()
+}
+
+const bar = {
+ goto foo
+ -> 42
+:foo
+ -> 10
+}
diff --git a/test/tests b/test/tests
index 33cbd2b..7e56115 100644
--- a/test/tests
+++ b/test/tests
@@ -82,6 +82,7 @@ B catfile P Hello-世界
B encodechar P 1世界äa
B exportcycle E 0
B import-type E 0
+B local-labels E 10
F declmismatch
F infermismatch
# F usedef ## BUGGERED