hallo2.nim 259 B

123456789101112131415161718
  1. discard """
  2. output: "Hello World"
  3. """
  4. # Test incremental type information
  5. type
  6. TNode = object {.pure.}
  7. le, ri: ref TNode
  8. data: string
  9. proc newNode(data: string): ref TNode =
  10. new(result)
  11. result.data = data
  12. echo newNode("Hello World").data