teffects4.nim 331 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: [ReadIOEffect].}
  10. proc q() {.tags: [IoEffect].} =
  11. discard
  12. proc raiser(): int =
  13. writeLine stdout, "arg"
  14. if true:
  15. q()
  16. var o: TObjB
  17. o.fn = raiser