summary refs log tree commit diff stats
path: root/tests/effects/teffects3.nim
blob: cbd11f722e9ebb8cbd6a3f54c4c7607d2e4a4dec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
discard """
  line: 18
  errormsg: "type mismatch"
"""

type
  TObj = object {.pure, inheritable.}
  TObjB = object of TObj
    a, b, c: string
    fn: proc (): int {.tags: [].}



proc raiser(): int {.tags: [TObj, WriteIoEffect].} =
  writeLine stdout, "arg"

var o: TObjB
o.fn = raiser