v2 / vlib / v / checker / tests / amod / amod.v
32 lines · 25 sloc · 300 bytes · 12e19fa2a41f3e385dd94575d7b703dc0af8b30f
Raw
1module amod
2
3pub struct Xyz {
4pub:
5 x int
6}
7
8pub struct Bcg {
9 x int
10}
11
12pub struct Bcg2[T] {
13 x int
14}
15
16@[params]
17pub struct FooParams {
18 bar string
19}
20
21pub fn foo(opts FooParams) {}
22
23struct PrivateFoo {
24pub:
25 bar int
26}
27
28pub fn new_private_foo(bar int) PrivateFoo {
29 return PrivateFoo{
30 bar: bar
31 }
32}
33