summary refs log tree commit diff stats
path: root/tests/effects/teffects7.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/effects/teffects7.nim')
-rw-r--r--tests/effects/teffects7.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/effects/teffects7.nim b/tests/effects/teffects7.nim
new file mode 100644
index 000000000..1cd144459
--- /dev/null
+++ b/tests/effects/teffects7.nim
@@ -0,0 +1,14 @@
+discard """
+  errormsg: "can raise an unlisted exception: ref FloatingPointError"
+  line: 10
+"""
+
+proc foo() {.raises: [].} =
+  try:
+    discard
+  except KeyError:
+    raise newException(FloatingPointError, "foo")
+  except Exception:
+    discard
+
+foo()