summary refs log tree commit diff stats
path: root/tests/accept/run/tfinally3.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/run/tfinally3.nim')
-rw-r--r--tests/accept/run/tfinally3.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/accept/run/tfinally3.nim b/tests/accept/run/tfinally3.nim
new file mode 100644
index 000000000..e8d81c893
--- /dev/null
+++ b/tests/accept/run/tfinally3.nim
@@ -0,0 +1,12 @@
+# Test break in try statement:
+
+proc main: bool = 
+  while true:
+    try:
+      return true
+    finally:
+      break
+  return false
+
+echo main() #OUT false
+