teffects4.nim 343 B

12345678910111213141516171819202122232425
  1. discard """
  2. line: 23
  3. errormsg: "type mismatch"
  4. """
  5. type
  6. TObj = object {.pure, inheritable.}
  7. TObjB = object of TObj
  8. a, b, c: string
  9. fn: proc (): int {.tags: [FReadIO].}
  10. EIO2 = ref object of EIO
  11. proc q() {.tags: [FIO].} =
  12. nil
  13. proc raiser(): int =
  14. writeLine stdout, "arg"
  15. if true:
  16. q()
  17. var o: TObjB
  18. o.fn = raiser