This commit is contained in:
Araq 2015-08-09 23:53:22 +02:00
commit 799e0f3274
2 changed files with 20 additions and 0 deletions

17
tests/vm/tforwardproc.nim Normal file
View file

@ -0,0 +1,17 @@
discard """
errormsg: "cannot evaluate at compile time: initArray"
line: 11
"""
# bug #3066
proc initArray(): array[10, int]
const
someTable = initArray()
proc initArray(): array[10, int] =
for f in 0..<10:
result[f] = 3
when isMainModule: echo repr(someTable)