diff options
Diffstat (limited to 'v_windows/v/old/vlib/v/parser/tests/nested_defer.vv')
-rw-r--r-- | v_windows/v/old/vlib/v/parser/tests/nested_defer.vv | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/v_windows/v/old/vlib/v/parser/tests/nested_defer.vv b/v_windows/v/old/vlib/v/parser/tests/nested_defer.vv new file mode 100644 index 0000000..7abc2d3 --- /dev/null +++ b/v_windows/v/old/vlib/v/parser/tests/nested_defer.vv @@ -0,0 +1,14 @@ +fn test1() int { + mut a := 0 + defer { + a = 12 + defer { + a = 13 + } + } + return a + +fn main() { + x := test1() + println(x) +} |