summary refs log tree commit diff stats
path: root/tests/objects/toop.nim
blob: 0b42c2c22dad1f689adae6b991277fd3a0b9e393 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  output: "b"
"""

type
  TA = object of TObject
    x, y: int
  
  TB = object of TA
    z: int
    
  TC = object of TB
    whatever: string
  
proc p(a: var TA) = echo "a"
proc p(b: var TB) = echo "b"

var c: TC

p(c)