mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
22 lines
226 B
Nim
22 lines
226 B
Nim
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)
|
|
|