vxx2 / vlib / v / checker / tests / struct_field_map_address_err.out
7 lines · 7 sloc · 398 bytes · e51f0be6db5807b4e4ea03634d05c824c3fb7ab5
Raw
1vlib/v/checker/tests/struct_field_map_address_err.vv:12:26: error: cannot take the address of map values outside `unsafe`
2 10 | mut s := &StructWithMap{}
3 11 | s.m['abc'] = StructWithMap{'abc', {}}
4 12 | pointer_to_map_value := &s.m['abc'].m['xyz'].m
5 | ^
6 13 | dump(ptr_str(pointer_to_map_value))
7 14 | return s, pointer_to_map_value
8