tusefoo2.nim 277 B

1234567891011121314151617181920
  1. discard """
  2. output: '''compiles'''
  3. """
  4. # Test that the object type does not need to be resolved at all:
  5. type
  6. mypackage.Foo = object
  7. Other = proc (inp: Foo)
  8. Node = ref object
  9. external: ptr Foo
  10. data: string
  11. var x: Node
  12. new(x)
  13. x.data = "compiles"
  14. echo x.data