Unit type sierra vars sometimes map to non-unit type Cairo vars. It is the effect of some functions like add_assign returning unit type (assignment happens via ref argument). The unit type then have a stable location that we treat as one corresponding to the non-unit type Cairo var. Example:
let mut x = 0;
x += 5; // `add_assign` is called under the hood and the resulting sierra var id of unit type maps to (IIRC) to the whole `x += 5` expression
Potential solution: ignore sierra vars that map to whole assignment expression (check if it does not have unintended consequences!)
Unit type sierra vars sometimes map to non-unit type Cairo vars. It is the effect of some functions like
add_assignreturning unit type (assignment happens viarefargument). The unit type then have a stable location that we treat as one corresponding to the non-unit type Cairo var. Example:Potential solution: ignore sierra vars that map to whole assignment expression (check if it does not have unintended consequences!)