teffects5.nim 253 B

123456789101112131415
  1. discard """
  2. errormsg: "type mismatch"
  3. line: 7
  4. """
  5. proc p(q: proc() ): proc() {.tags: [], raises: [], closure.} =
  6. return proc () =
  7. q()
  8. let yay = p(proc () = raise newException(EIO, "IO"))
  9. proc main() {.raises: [], tags: [].} = yay()
  10. main()