summary refs log tree commit diff stats
path: root/tests/effects/teffects4.nim
blob: fd5dd49e24e73fd2ed77ed14794753848002b242 (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
24
discard """
  line: 23
  errormsg: "type mismatch"
"""

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

  EIO2 = ref object of EIO

proc q() {.tags: [FIO].} =
  nil

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

var o: TObjB
o.fn = raiser