This commit is contained in:
Andreas Rumpf 2020-04-01 20:30:28 +02:00 • committed by GitHub
commit bc37668c5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 81 additions and 20 deletions

View file

@ -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()