t11354.nim 325 B

1234567891011121314151617181920
  1. discard """
  2. output: '''
  3. 0
  4. @[@[0, 1]]
  5. '''
  6. """
  7. type
  8. TrackySeq[T] = object
  9. s: seq[T]
  10. pos: int
  11. proc foobar(ls: var TrackySeq[seq[int]], i: int): var seq[int] =
  12. echo ls.pos # removing this, or making the return explicit works
  13. ls.s[i]
  14. var foo: TrackySeq[seq[int]]
  15. foo.s.add(@[0])
  16. foo.foobar(0).add(1)
  17. echo foo.s