summary refs log tree commit diff stats
path: root/tests/reject
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-05-11 10:53:40 +0200
committerAraq <rumpf_a@web.de>2013-05-11 10:53:40 +0200
commitadedfc3a10ca6fb4b3c2f467b2d1f36da678c164 (patch)
treee7cf48d6e80f19cabcd61bda60823593893060dc /tests/reject
parent1980c8930d69ec3a53bcb4da993d387269f78eab (diff)
downloadNim-adedfc3a10ca6fb4b3c2f467b2d1f36da678c164.tar.gz
new effect system should be sound now
Diffstat (limited to 'tests/reject')
-rw-r--r--tests/reject/teffects5.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/reject/teffects5.nim b/tests/reject/teffects5.nim
new file mode 100644
index 000000000..42be115c3
--- /dev/null
+++ b/tests/reject/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()