t12640.nim 275 B

1234567891011121314151617181920212223242526
  1. discard """
  2. nimout: '''1
  3. 2
  4. 3
  5. [1, 2, 3]'''
  6. output: '''1
  7. 2
  8. 3
  9. [1, 2, 3]'''
  10. """
  11. proc doIt(a: openArray[int]) =
  12. echo a
  13. proc foo() =
  14. var bug {.global, compiletime.}: seq[int]
  15. bug = @[1, 2 ,3]
  16. for i in 0 .. high(bug): echo bug[i]
  17. doIt(bug)
  18. static:
  19. foo()
  20. foo()