mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 11:42:33 +00:00
18 lines
259 B
Nim
18 lines
259 B
Nim
discard """
|
|
output: "Hello World"
|
|
"""
|
|
|
|
# Test incremental type information
|
|
|
|
type
|
|
TNode = object {.pure.}
|
|
le, ri: ref TNode
|
|
data: string
|
|
|
|
proc newNode(data: string): ref TNode =
|
|
new(result)
|
|
result.data = data
|
|
|
|
echo newNode("Hello World").data
|
|
|