v2 / vlib / v / checker / tests / selector_struct_init_amp_err.out
7 lines · 7 sloc · 280 bytes · 3af720921c6dbc9732d7096169b6e19cf19bf4ed
Raw
1vlib/v/checker/tests/selector_struct_init_amp_err.vv:6:11: error: should not create object instance on the heap to simply access a member
2 4 |
3 5 | fn test_main() {
4 6 | field := &Object{}.a
5 | ~~~~~~~~~~~
6 7 | assert field == 123
7 8 | }
8