summary refs log tree commit diff stats
path: root/tests/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-08-22 08:38:47 +0200
committerAraq <rumpf_a@web.de>2013-08-22 08:38:47 +0200
commit6f1fc1b5ba7f74fde21467f5f0bfd294ad9292f3 (patch)
tree1bc09471b81b6b0b1a9830e4d0858a21cb248a78 /tests/compile
parent50403afb5c8d49f2d9046498ea714251a3e4ad90 (diff)
downloadNim-6f1fc1b5ba7f74fde21467f5f0bfd294ad9292f3.tar.gz
fixed and documented computedGoto pragma
Diffstat (limited to 'tests/compile')
-rw-r--r--tests/compile/tcomputedgoto.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/compile/tcomputedgoto.nim b/tests/compile/tcomputedgoto.nim
index 661f70743..2c3b4bbd4 100644
--- a/tests/compile/tcomputedgoto.nim
+++ b/tests/compile/tcomputedgoto.nim
@@ -31,7 +31,8 @@ proc vm() =
   var pc = 0
   while true:
     {.computedGoto.}
-    case instructions[pc]
+    let instr = instructions[pc]
+    case instr
     of enumA:
       echo "yeah A"
     of enumC, enumD:
@@ -39,7 +40,7 @@ proc vm() =
     of enumB:
       echo "yeah B"
     of enumE:
-      return
+      break
     inc(pc)
   
 vm()