mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 12:07:51 +00:00
26 lines
275 B
Nim
26 lines
275 B
Nim
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()
|