tforwardproc.nim 278 B

123456789101112131415161718
  1. discard """
  2. errormsg: "cannot evaluate at compile time: initArray"
  3. line: 11
  4. """
  5. # bug #3066
  6. proc initArray(): array[10, int]
  7. const
  8. someTable = initArray()
  9. proc initArray(): array[10, int] =
  10. for f in 0..<10:
  11. result[f] = 3
  12. when isMainModule: echo repr(someTable)