parent
fde17b159f
commit
b8bcf236dd
2 changed files with 32 additions and 1 deletions
25
tests/pragmas/t12640.nim
Normal file
25
tests/pragmas/t12640.nim
Normal file
|
|
@ -0,0 +1,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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue