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