diff options
Diffstat (limited to 'tests/destructor/tgotoexceptions4.nim')
-rw-r--r-- | tests/destructor/tgotoexceptions4.nim | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/destructor/tgotoexceptions4.nim b/tests/destructor/tgotoexceptions4.nim index 918169084..b2b481256 100644 --- a/tests/destructor/tgotoexceptions4.nim +++ b/tests/destructor/tgotoexceptions4.nim @@ -4,7 +4,9 @@ discard """ caught in fun caughtsome msgMyExcept in finally -caught1''' +caught1 +123 +123''' """ when true: @@ -38,3 +40,21 @@ when true: except CatchableError: echo "caught1" funB() + +# bug #13782 + +import strutils +var n = 123 + +try: n = parseInt("xxx") +except: discard + +echo n + +proc sameTestButForLocalVar = + var n = 123 + try: n = parseInt("xxx") + except: discard + echo n + +sameTestButForLocalVar() |