fixes #11577
This commit is contained in:
parent
993b3909a8
commit
0a81b038fd
2 changed files with 31 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
cmd: '''nim c --newruntime $file'''
|
||||
output: '''OK 2
|
||||
4 1'''
|
||||
output: '''OK 3
|
||||
5 1'''
|
||||
"""
|
||||
|
||||
import strutils, math
|
||||
|
|
@ -36,6 +36,19 @@ except ValueError:
|
|||
except:
|
||||
discard
|
||||
|
||||
# bug #11577
|
||||
|
||||
proc newError*: owned(ref Exception) {.noinline.} =
|
||||
new(result)
|
||||
|
||||
proc mainC =
|
||||
raise newError()
|
||||
|
||||
try:
|
||||
mainC()
|
||||
except:
|
||||
inc ok
|
||||
|
||||
echo "OK ", ok
|
||||
|
||||
let (a, d) = allocCounters()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue