diff options
Diffstat (limited to 'tests/exception/tfinally3.nim')
-rw-r--r-- | tests/exception/tfinally3.nim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/exception/tfinally3.nim b/tests/exception/tfinally3.nim new file mode 100644 index 000000000..e65661cd0 --- /dev/null +++ b/tests/exception/tfinally3.nim @@ -0,0 +1,18 @@ +discard """ + file: "tfinally3.nim" + output: "false" +""" +# Test break in try statement: + +proc main: bool = + while true: + try: + return true + finally: + break + return false + +echo main() #OUT false + + + |