summary refs log tree commit diff stats
path: root/tests/rodfiles/hallo2.nim
blob: 40fe64cfd5a9b65340a1339780cf11ae53150545 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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