diff options
Diffstat (limited to 'v_windows/v/vlib/v/tests/goto_test.v')
-rw-r--r-- | v_windows/v/vlib/v/tests/goto_test.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/tests/goto_test.v b/v_windows/v/vlib/v/tests/goto_test.v new file mode 100644 index 0000000..b465473 --- /dev/null +++ b/v_windows/v/vlib/v/tests/goto_test.v @@ -0,0 +1,13 @@ +fn test_goto() { + mut i := 0 + a: + b := 1 + _ = b + i++ + if i < 3 { + unsafe { + goto a + } + } + assert i == 3 +} |