mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
20 lines
277 B
Nim
20 lines
277 B
Nim
discard """
|
|
output: '''compiles'''
|
|
"""
|
|
|
|
# Test that the object type does not need to be resolved at all:
|
|
|
|
type
|
|
mypackage.Foo = object
|
|
Other = proc (inp: Foo)
|
|
|
|
Node = ref object
|
|
external: ptr Foo
|
|
data: string
|
|
|
|
var x: Node
|
|
new(x)
|
|
x.data = "compiles"
|
|
|
|
echo x.data
|