bugformattergood first issueteam:tooling
Description
To see the bug in practice see https://github.com/FuelLabs/sway/pull/7620
pub fn write<T>(self, val: T) {
if __size_of::<T>() == 0 { } else if __is_reference_type::<T>() { // <---- look here how strange it is
asm(dst: self, src: val, count: __size_of_val(val)) {
mcp dst src count;
};
} else if __size_of::<T>() == 1 {
asm(ptr: self, val: val) {
sb ptr val i0;
};
} else {
asm(ptr: self, val: val) {
sw ptr val i0;
};
}
}