vxx2 / vlib / v / checker / tests / struct_init_deprecations.vv
23 lines · 20 sloc · 297 bytes · 9a0435db057d090aa084aff1c2a6317da5d64a6f
Raw
1import v.checker.tests.module_with_deprecated_structs as m
2
3fn init_deprecated_structs() {
4 o := m.Old{}
5 p := m.Present{}
6 dump(o)
7 dump(p)
8}
9
10fn init_deprecated_fields() {
11 x := m.Xyz{
12 a: 0
13 b: 1
14 c: 2
15 d: 3
16 }
17 dump(x)
18}
19
20fn main() {
21 init_deprecated_structs()
22 init_deprecated_fields()
23}
24