diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/reject/twrongconst.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/reject/twrongconst.nim b/tests/reject/twrongconst.nim new file mode 100644 index 000000000..16fe3bff6 --- /dev/null +++ b/tests/reject/twrongconst.nim @@ -0,0 +1,10 @@ +discard """ + output: "Error: constant expression expected" + line: 7 +""" + +var x: array[100, char] +template Foo : expr = x[42] + + +const myConst = foo |