summary refs log tree commit diff stats
path: root/tests/destructor
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-03-10 00:52:46 +0100
committerGitHub <noreply@github.com>2020-03-10 00:52:46 +0100
commit090ba1e3a390e9997f45001e18dc93ba7aa091c3 (patch)
treeaa21753396c77ebd4365797877da1f1767be7af8 /tests/destructor
parent7d07897a9941717432d5872c3e0f203704902738 (diff)
downloadNim-090ba1e3a390e9997f45001e18dc93ba7aa091c3.tar.gz
fixes #13436 (#13615)
Diffstat (limited to 'tests/destructor')
-rw-r--r--tests/destructor/tgotoexceptions6.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/destructor/tgotoexceptions6.nim b/tests/destructor/tgotoexceptions6.nim
new file mode 100644
index 000000000..7c01f6a52
--- /dev/null
+++ b/tests/destructor/tgotoexceptions6.nim
@@ -0,0 +1,10 @@
+discard """
+  cmd: "nim c --gc:arc --exceptions:goto $file"
+  outputsub: "Error: unhandled exception: virus detected [ValueError]"
+  exitcode: "1"
+"""
+
+# bug #13436
+proc foo =
+  raise newException(ValueError, "virus detected")
+foo()