teffects3.nim 288 B

12345678910111213141516171819
  1. discard """
  2. errormsg: "type mismatch"
  3. line: 18
  4. """
  5. type
  6. TObj {.pure, inheritable.} = object
  7. TObjB = object of TObj
  8. a, b, c: string
  9. fn: proc (): int {.tags: [].}
  10. proc raiser(): int {.tags: [TObj, WriteIoEffect].} =
  11. writeLine stdout, "arg"
  12. var o: TObjB
  13. o.fn = raiser