t12640.nim 334 B

123456789101112131415161718192021222324252627
  1. discard """
  2. matrix: "--mm:refc"
  3. nimout: '''1
  4. 2
  5. 3
  6. [1, 2, 3]'''
  7. output: '''1
  8. 2
  9. 3
  10. [1, 2, 3]'''
  11. """
  12. # todo fixme it doesn't work with ORC
  13. proc doIt(a: openArray[int]) =
  14. echo a
  15. proc foo() =
  16. var bug {.global, compiletime.}: seq[int]
  17. bug = @[1, 2 ,3]
  18. for i in 0 .. high(bug): echo bug[i]
  19. doIt(bug)
  20. static:
  21. foo()
  22. foo()