diff --git a/vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.vv b/vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.vv index 669371c908..35ca7a944a 100644 --- a/vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.vv +++ b/vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.vv @@ -1,19 +1,21 @@ fn many_strings() []string { mut res := []string{} - for i in 0..10000 { res << '${i:05}' } - return res + for i in 0 .. 10000 { + res << '${i:05}' + } + return res } fn abc() int { x := many_strings() - n := x.len - // NB: the local `x` is no longer used - // it should be freed *before* the return + n := x.len + // NB: the local `x` is no longer used + // it should be freed *before* the return return n } fn main() { - for i in 0..5 { + for i in 0 .. 5 { nstrings := abc() eprintln('nstrings ${i:10}: $nstrings') }