summary refs log blame commit diff stats
path: root/tests/cpp/t4834.nim
blob: 0275b1b70dcabb4282c81a7893ac504e3bf7f08e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                          
discard """
  targets: "cpp"
"""

# issue #4834
block:
  defer:
    let x = 0


proc main() =
  block:
    defer:
      raise newException(Exception, "foo")

doAssertRaises(Exception):
  main()