summary refs log tree commit diff stats
path: root/tests/controlflow/tblock1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/controlflow/tblock1.nim')
-rw-r--r--tests/controlflow/tblock1.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/controlflow/tblock1.nim b/tests/controlflow/tblock1.nim
new file mode 100644
index 000000000..70c844513
--- /dev/null
+++ b/tests/controlflow/tblock1.nim
@@ -0,0 +1,16 @@
+discard """
+  errormsg: "undeclared identifier: \'ha\'"
+  file: "tblock1.nim"
+  line: 14
+"""
+# check for forward label and
+# for failure when label is not declared
+
+proc main =
+  block endLess:
+    write(stdout, "Muaahh!\N")
+    break endLess
+
+  break ha #ERROR
+
+main()