t4834.nim 194 B

123456789101112131415161718
  1. discard """
  2. targets: "cpp"
  3. """
  4. # issue #4834
  5. block:
  6. defer:
  7. let x = 0
  8. proc main() =
  9. block:
  10. defer:
  11. raise newException(Exception, "foo")
  12. doAssertRaises(Exception):
  13. main()