summary refs log tree commit diff stats
path: root/tests/compile/toop.nim
blob: 5999a80736e55758fed4db93268efcaffc3ffcc2 (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
    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)