summary refs log tree commit diff stats
path: root/tests/method/trecmeth.nim
blob: 32f620f15f663d627d7ebff95aad1a3045194890 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Note: We only compile this to verify that code generation
# for recursive methods works, no code is being executed

type
  Obj = ref object of TObject

# Mutual recursion

method alpha(x: Obj)
method beta(x: Obj)

method alpha(x: Obj) =
  beta(x)

method beta(x: Obj) =
  alpha(x)

# Simple recursion

method gamma(x: Obj) =
  gamma(x)