summary refs log tree commit diff stats
path: root/tests/ccgbugs/trecursive_closure.nim
blob: 4b6514b906f5e81b6fc2b39ed378dab58f5ec42d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
action: compile
"""

# bug #2233
type MalType = object
  fun: proc: MalType

proc f(x: proc: MalType) =
  discard x()

f(nil)

# bug #2823

type A = object #of RootObj <-- Uncomment this to get no errors
  test: proc(i: A): bool
var a: proc(i: A): bool # Or comment this line to get no errors