summary refs log tree commit diff stats
path: root/tests/effects/teffects5.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/effects/teffects5.nim')
-rw-r--r--tests/effects/teffects5.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/effects/teffects5.nim b/tests/effects/teffects5.nim
new file mode 100644
index 000000000..d630a6fc4
--- /dev/null
+++ b/tests/effects/teffects5.nim
@@ -0,0 +1,14 @@
+discard """
+  errormsg: "type mismatch"
+  line: 7
+"""
+
+proc p(q: proc() ): proc() {.tags: [], raises: [], closure.} =
+  return proc () =
+    q()
+  
+let yay = p(proc () = raise newException(EIO, "IO"))
+
+proc main() {.raises: [], tags: [].} = yay()
+
+main()