summary refs log tree commit diff stats
path: root/tests/vm/twrongconst.nim
blob: 5c0c80f9fdf3d1b5d450f8be38869c10cf2d7543 (plain) (blame)
1
2
3
4
5
6
7
8
9
discard """
  errormsg: "cannot evaluate at compile time: x"
  line: 9
"""

var x: array[100, char]
template Foo : expr = x[42]

const myConst = foo