t22462.nim 262 B

123456789101112131415161718192021
  1. discard """
  2. action: "run"
  3. output: '''
  4. 1
  5. 1
  6. 1
  7. '''
  8. matrix: "--mm:refc"
  9. targets: "c cpp"
  10. """
  11. type Object = object
  12. someComplexType: seq[int]
  13. index: Natural
  14. func newObject(): Object = result.index.inc
  15. for i in 1..3:
  16. let o = newObject()
  17. echo o.index