diff options
author | Andreas Rumpf <ar@kimeta.de> | 2014-04-10 01:47:20 +0200 |
---|---|---|
committer | Andreas Rumpf <ar@kimeta.de> | 2014-04-10 01:47:20 +0200 |
commit | dcfc7a8896166563f6fd80fbab81bc50e0b5a217 (patch) | |
tree | 4a247ec2d64bafec53e5ab24b0fda89642908a07 /tests/exception/texceptionbreak.nim | |
parent | a86c774932afd8b6782df1925837df9df04ef381 (diff) | |
parent | 8b82004359b8d852fa0107d79cc78b21eb35c028 (diff) | |
download | Nim-dcfc7a8896166563f6fd80fbab81bc50e0b5a217.tar.gz |
resolved conflict
Diffstat (limited to 'tests/exception/texceptionbreak.nim')
-rw-r--r-- | tests/exception/texceptionbreak.nim | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/exception/texceptionbreak.nim b/tests/exception/texceptionbreak.nim new file mode 100644 index 000000000..76e986787 --- /dev/null +++ b/tests/exception/texceptionbreak.nim @@ -0,0 +1,45 @@ +discard """ + file: "tnestedbreak.nim" + output: "1\n2\n3\n4" +""" + +# First variety +try: + raise newException(EOS, "Problem") +except EOS: + for y in [1, 2, 3]: + discard + try: + discard + except EOS: + discard +echo "1" + +# Second Variety +try: + raise newException(EOS, "Problem") +except EOS: + for y in [1, 2, 3]: + discard + for y in [1, 2, 3]: + discard + +echo "2" + +# Third Variety +try: + raise newException(EOS, "Problem") +except EOS: + block: + break + +echo "3" + +# Fourth Variety +block: + try: + raise newException(EOS, "Problem") + except EOS: + break + +echo "4" \ No newline at end of file |