v2 / vlib / v / fmt / tests / proto_module_importing_vproto_keep.vv
35 lines · 31 sloc · 579 bytes · 1123f4fcc99af27f902d08d37ae37f5536051671
Raw
1module proto
2
3import vproto
4
5struct Xyz {
6 x int
7}
8
9struct Abcde {
10 f1 vproto.Xyz
11 f2 &vproto.Xyz
12 f3 []vproto.Xyz
13 f4 []&vproto.Xyz
14 f5 map[string]vproto.Xyz
15 f6 map[string]&vproto.Xyz
16 //
17 p1 Xyz
18 p2 &Xyz
19 p3 []Xyz
20 p4 []&Xyz
21 p5 map[string]Xyz
22 p6 map[string]&Xyz
23 p7 map[string]map[string]map[string]&Xyz
24 //
25 p8 map[string]map[string]map[string]map[string]&Xyz
26 p9 map[string]map[string]map[string]map[string]&vproto.Xyz
27}
28
29fn abc() {
30 x := vproto.Xyz{2}
31 mut a := []vproto.Xyz{}
32 a << x
33 a << vproto.Xyz{3}
34 z := map[string]map[string]map[string]map[string]&vproto.Xyz{}
35}
36