summary refs log blame commit diff stats
path: root/tests/vm/twrongwhen.nim
blob: d67e4288378e833a173d132fe4f62f269ca0127e (plain) (tree)
1
2
3
4
5
6
           
                                                


         
                 






                      
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"