close #4834 add testcase (#16649)

This commit is contained in:
flywind
2021-01-09 04:54:26 -06:00
committed by GitHub
parent b7ff0b2a11
commit dbff2cd938

17
tests/cpp/t4834.nim Normal file
View File

@@ -0,0 +1,17 @@
discard """
targets: "cpp"
"""
# issue #4834
block:
defer:
let x = 0
proc main() =
block:
defer:
raise newException(Exception, "foo")
doAssertRaises(Exception):
main()