mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-24 00:05:25 +00:00
Merge branch 'master' of github.com:Araq/Nimrod into upstream
This commit is contained in:
14
tests/reject/teffects5.nim
Normal file
14
tests/reject/teffects5.nim
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user