summary refs log tree commit diff stats
path: root/tests/pragmas/tuserpragma2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pragmas/tuserpragma2.nim')
-rw-r--r--tests/pragmas/tuserpragma2.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pragmas/tuserpragma2.nim b/tests/pragmas/tuserpragma2.nim
new file mode 100644
index 000000000..c3f31cd5e
--- /dev/null
+++ b/tests/pragmas/tuserpragma2.nim
@@ -0,0 +1,12 @@
+discard """
+  errormsg: "can raise an unlisted exception: ref Exception"
+  file: "tuserpragma2.nim"
+  line: 11
+"""
+{.push warningAsError[Effect]: on.}
+# bug #7216
+{.pragma: my_pragma, raises: [].}
+
+proc test1 {.my_pragma.} =
+  raise newException(Exception, "msg")
+{.pop.}