diff options
author | Araq <rumpf_a@web.de> | 2015-08-09 23:53:22 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-08-09 23:53:22 +0200 |
commit | 799e0f3274edd9d0fadcc58640afa32b3bdc6da1 (patch) | |
tree | b90db848c9ba626681659d4838dc171c398f605d /tests/vm/tforwardproc.nim | |
parent | f934c9213220bbb4f0ac13aa804ab14c3393202e (diff) | |
download | Nim-799e0f3274edd9d0fadcc58640afa32b3bdc6da1.tar.gz |
fixes #3066
Diffstat (limited to 'tests/vm/tforwardproc.nim')
-rw-r--r-- | tests/vm/tforwardproc.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/vm/tforwardproc.nim b/tests/vm/tforwardproc.nim new file mode 100644 index 000000000..727ac6641 --- /dev/null +++ b/tests/vm/tforwardproc.nim @@ -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) |