diff options
Diffstat (limited to 'tests/vm/twrongconst.nim')
-rw-r--r-- | tests/vm/twrongconst.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/vm/twrongconst.nim b/tests/vm/twrongconst.nim new file mode 100644 index 000000000..a329cb578 --- /dev/null +++ b/tests/vm/twrongconst.nim @@ -0,0 +1,9 @@ +discard """ + errormsg: "cannot evaluate at compile time: x" + line: 7 +""" + +var x: array[100, char] +template foo : char = x[42] + +const myConst = foo |