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