diff options
author | Araq <rumpf_a@web.de> | 2014-03-05 02:14:53 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-03-05 02:14:53 +0100 |
commit | aa92669d9219816f9cd9036b4977ddbdd16d3c5d (patch) | |
tree | f024b3c52686061393b8c464a06b5c931725e649 /tests/vm | |
parent | 1ce30b9e100bd12394fa8f633137b4da4c98a1d9 (diff) | |
download | Nim-aa92669d9219816f9cd9036b4977ddbdd16d3c5d.tar.gz |
fixes #937
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/twrongwhen.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/vm/twrongwhen.nim b/tests/vm/twrongwhen.nim new file mode 100644 index 000000000..085bb6fb6 --- /dev/null +++ b/tests/vm/twrongwhen.nim @@ -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" + |