summary refs log tree commit diff stats
path: root/tests/pragmas/t12640.nim
blob: 60177d034d8c234e0aaf3fa09984e7571c6bd7fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
discard """
  nimout: '''1
2
3
[1, 2, 3]'''

  output: '''1
2
3
[1, 2, 3]'''
"""


proc doIt(a: openArray[int]) =
  echo a

proc foo() = 
  var bug {.global, compiletime.}: seq[int]
  bug = @[1, 2 ,3]
  for i in 0 .. high(bug): echo bug[i]
  doIt(bug)

static:
  foo()
foo()