mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-11 22:08:54 +00:00
17
tests/cpp/t4834.nim
Normal file
17
tests/cpp/t4834.nim
Normal 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()
|
||||
Reference in New Issue
Block a user