fixes #937
This commit is contained in:
parent
1ce30b9e10
commit
aa92669d92
5 changed files with 47 additions and 6 deletions
13
tests/vm/twrongwhen.nim
Normal file
13
tests/vm/twrongwhen.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: "Error: cannot evaluate at compile time: x"
|
||||
line: 7
|
||||
"""
|
||||
|
||||
proc bla(x:int) =
|
||||
when x == 0:
|
||||
echo "oops"
|
||||
else:
|
||||
echo "good"
|
||||
|
||||
bla(2) # echos "oops"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue