v2 / vlib / v / parser / tests / struct_update_err.vv
17 lines · 15 sloc · 143 bytes · 164d7bf5fbf8056c76955206deac5fb343d5f0ea
Raw
1struct Foo {
2 name string
3 age int
4}
5
6struct Foo2 {}
7
8fn main() {
9 f := Foo{
10 name: 'test'
11 age: 18
12 }
13 f2 := Foo{
14 name: 'f2'
15 ...f
16 }
17}
18