the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)
summary refs log tree commit diff stats
path: root/tests/vm/twrongconst.nim
blob: 424ed080ee07beffacb7d5f5425a2d615b5c3ea5 (plain) (blame)
1
2
3
4
5
6
7
8
9
discard """
  errormsg: "cannot evaluate at compile time: x"
  line: 7
"""

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

const myConst = foo