diff options
Diffstat (limited to 'v_windows/v/vlib/v/fmt/tests/struct_update_keep.vv')
-rw-r--r-- | v_windows/v/vlib/v/fmt/tests/struct_update_keep.vv | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/v_windows/v/vlib/v/fmt/tests/struct_update_keep.vv b/v_windows/v/vlib/v/fmt/tests/struct_update_keep.vv new file mode 100644 index 0000000..e550ac1 --- /dev/null +++ b/v_windows/v/vlib/v/fmt/tests/struct_update_keep.vv @@ -0,0 +1,17 @@ +struct Foo { + name string + age int +} + +struct Foo2 {} + +fn main() { + f := Foo{ + name: 'test' + age: 18 + } + f2 := Foo{ + ...f + name: 'f2' + } +} |