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

type
  TObj {.pure, inheritable.} = object
  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