summary refs log blame commit diff stats
path: root/tests/vm/tforwardproc.nim
blob: 727ac6641553236745b966ae8d42667df2034c9a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)