This commit is contained in:
parent
de74362213
commit
dddfbcf211
1 changed files with 16 additions and 0 deletions
16
tests/arc/texceptions.nim
Normal file
16
tests/arc/texceptions.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
discard """
|
||||||
|
cmd: "nim cpp --gc:arc $file"
|
||||||
|
"""
|
||||||
|
|
||||||
|
block: # issue #13071
|
||||||
|
type MyExcept = object of CatchableError
|
||||||
|
proc gun()=
|
||||||
|
raise newException(MyExcept, "foo:")
|
||||||
|
proc fun()=
|
||||||
|
var a = ""
|
||||||
|
try:
|
||||||
|
gun()
|
||||||
|
except Exception as e:
|
||||||
|
a = e.msg & $e.name # was segfaulting here for `nim cpp --gc:arc`
|
||||||
|
doAssert a == "foo:MyExcept"
|
||||||
|
fun()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue