Skip to content

Fix unit types mappings #128

Description

@piotmag769

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!)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions