Closed yuyi98 closed 5 days ago
This PR fix fn call with mut reference args (fix #21265).
@[heap] struct Client { mut: next &Client = unsafe { nil } prev &Client = unsafe { nil } } fn init_vm1(mut head &Client) { for c := head; c; c = c.next { } } fn init_vm2(mut head &Client) { for c := head; c == unsafe { nil }; c = c.next { } } fn main() { mut head := &Client{} init_vm1(mut head) init_vm2(mut head) assert true } PS D:\Test\v\tt1> v run .
This PR fix fn call with mut reference args (fix #21265).