summary refs log tree commit diff stats
path: root/tests/vm/twrongconst.nim
blob: 68ab2757cf8aa1c19b087900190198ab44641bef (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