summary refs log tree commit diff stats
path: root/tests/vm/tforwardproc.nim
blob: bcd929f0ea1496bb49dd6a25c5e4d97255c1cc9d (plain) (blame)
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 true: echo repr(someTable)