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

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



proc q() {.tags: [IoEffect].} =
  discard

proc raiser(): int =
  writeLine stdout, "arg"
  if true:
    q()

var o: TObjB
o.fn = raiser