diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2021-01-09 04:54:26 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-09 11:54:26 +0100 |
commit | dbff2cd938b326279de0f3f97b2dd8c54a90468a (patch) | |
tree | 28701f673ad104d158336a0336372bb3802ca22d /tests/cpp | |
parent | b7ff0b2a1128dc976379102e180ae883641d6c82 (diff) | |
download | Nim-dbff2cd938b326279de0f3f97b2dd8c54a90468a.tar.gz |
close #4834 add testcase (#16649)
Diffstat (limited to 'tests/cpp')
-rw-r--r-- | tests/cpp/t4834.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/cpp/t4834.nim b/tests/cpp/t4834.nim new file mode 100644 index 000000000..0275b1b70 --- /dev/null +++ b/tests/cpp/t4834.nim @@ -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() |