v2 / vlib / v / tests / fns / call_option_param_test.v
15 lines · 12 sloc · 226 bytes · 6dcedae784e1cdcf6b56e2bf0640b706f3fe3a7c
Raw
1pub fn new_group(t ?Texts) Group {
2 return Group{}
3}
4
5struct Group {
6}
7
8struct Texts {
9}
10
11fn test_main() {
12 a := 0
13 _ := if a != 0 { new_group(Texts{}) } else { Group{} }
14 _ := if a != 0 { new_group(none) } else { Group{} }
15}
16