mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
20 lines
278 B
Nim
20 lines
278 B
Nim
discard """
|
|
output: '''(foo: 38, other: string here)
|
|
43'''
|
|
"""
|
|
|
|
type
|
|
Base = ref object of RootObj
|
|
Foo {.partial.} = ref object of Base
|
|
|
|
proc my(f: Foo) =
|
|
#var f.next = f
|
|
let f.foo = 38
|
|
let f.other = "string here"
|
|
echo f[]
|
|
echo f.foo + 5
|
|
|
|
var g: Foo
|
|
new(g)
|
|
my(g)
|