v2 / vlib / v / checker / tests / unsafe_fixed_array_assign.vv
12 lines · 11 sloc · 105 bytes · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1struct Box {
2mut:
3 num int
4}
5
6mut box := Box{
7 num: 10
8}
9a := [&box]!
10mut b := a
11b[0].num = 0
12println(a)
13