vxx2 / vlib / v / checker / tests / struct_field_init_option_ref_err.vv
14 lines · 11 sloc · 113 bytes · 51aaf3c49f141d2ba36b335fa1f1576ee6a096bb
Raw
1module main
2
3struct Foo {}
4
5struct Bar {
6 field ?&Foo
7}
8
9fn main() {
10 foo := ?Foo{}
11 _ := Bar{
12 field: foo
13 }
14}
15