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

proc bla(x:int) =
  when x == 0:
    echo "oops"
  else:
    echo "good"

bla(2)  # echos "oops"