error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:6:10 │ 6 │ *&mut 0 = false; │ ^^^^^^ ----- Given: 'bool' │ │ │ Invalid mutation. New value is not valid for the reference │ Expected: integer error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:7:10 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 7 │ *&mut S{f:0}.f = &1; │ ^^^^^^^^^^^^^ -- Given: '&{integer}' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:8:10 │ 8 │ *foo(&mut 0) = (1, 0); │ ^^^^^^^^^^^ ------ Given: '({integer}, {integer})' │ │ │ Invalid mutation. New value is not valid for the reference · 23 │ fun foo(x: &mut u64): &mut u64 { │ --- Expected: 'u64' error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:9:9 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 9 │ bar(&mut S{f:0}).f = (); │ ^^^^^^^^^^^^^^^^^^ -- Given: '()' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:10:10 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 10 │ *&mut bar(&mut S{f:0}).f = &0; │ ^^^^^^^^^^^^^^^^^^^^^^^ -- Given: '&{integer}' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:11:9 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 11 │ baz().f = false; │ ^^^^^^^ ----- Given: 'bool' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:12:10 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 12 │ *&mut baz().f = false; │ ^^^^^^^^^^^^ ----- Given: 'bool' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:17:10 │ 16 │ let r = &mut S{ f: 0 }; │ --------- Expected: '0x8675309::M::S' 17 │ *r = X { f: 1 }; │ ^ ---------- Given: '0x8675309::M::X' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:19:9 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 19 │ r.f = &0; │ ^^^ -- Given: '&{integer}' │ │ │ Invalid mutation. New value is not valid for the reference error[E04007]: incompatible types ┌─ tests/move_check/typing/mutate_invalid.move:20:10 │ 2 │ struct S has drop { f: u64 } │ --- Expected: 'u64' · 20 │ *&mut r.f = (); │ ^^^^^^^^ -- Given: '()' │ │ │ Invalid mutation. New value is not valid for the reference