summary refs log tree commit diff stats
path: root/tests/effects
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2019-02-07 17:07:03 +0100
committerMiran <narimiran@disroot.org>2019-02-07 17:07:03 +0100
commitf23b0a7dc813db9bdfd556bdefbd201bb3e73502 (patch)
tree3d88f56fe883a855334369c05a7e61ec0f155573 /tests/effects
parentc95616f6ee353dd939a10023c29be087644e85be (diff)
downloadNim-f23b0a7dc813db9bdfd556bdefbd201bb3e73502.tar.gz
Fix handling of reraise in effect tracking (#10582)
This is the MVP in order not to get a completely useless error message
from the compiler.

Fixes #10579
Diffstat (limited to 'tests/effects')
-rw-r--r--tests/effects/teffects8.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/effects/teffects8.nim b/tests/effects/teffects8.nim
new file mode 100644
index 000000000..fb3c088d6
--- /dev/null
+++ b/tests/effects/teffects8.nim
@@ -0,0 +1,12 @@
+discard """
+  errormsg: "can raise an unlisted exception: Exception"
+  line: 10
+"""
+
+proc foo() {.raises: [].} =
+  try:
+    discard
+  except ValueError:
+    raise
+
+foo()