tusefoo.nim 269 B

1234567891011121314151617
  1. discard """
  2. output: '''@[(x: 3, y: 4)]'''
  3. """
  4. type
  5. mypackage.Foo = object
  6. Other = proc (inp: Foo)
  7. import definefoo
  8. # after this import, Foo is a completely resolved type, so
  9. # we can create a sequence of it:
  10. var s: seq[Foo] = @[]
  11. s.add Foo(x: 3, y: 4)
  12. echo s