| 1 | @[heap] |
| 2 | struct Client { |
| 3 | mut: |
| 4 | next &Client = unsafe { nil } |
| 5 | prev &Client = unsafe { nil } |
| 6 | } |
| 7 | |
| 8 | fn init_vm1(mut head &Client) { |
| 9 | for c := head; c; c = c.next { |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | fn init_vm2(mut head &Client) { |
| 14 | for c := head; c == unsafe { nil }; c = c.next { |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | fn test_fn_call_mut_ref_args() { |
| 19 | mut head := &Client{} |
| 20 | init_vm1(mut &head) |
| 21 | init_vm2(mut &head) |
| 22 | assert true |
| 23 | } |
| 24 |