diff options
Diffstat (limited to 'tests/compile')
-rw-r--r-- | tests/compile/tcomputedgoto.nim | 5 |
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() |