Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types of inserted constants #283

Merged
merged 1 commit into from
Jun 20, 2019
Merged

Conversation

arxenix
Copy link
Contributor

@arxenix arxenix commented Jun 19, 2019

I think another case where types are incorrect is in:

    function addTest(uint8 a, uint32 b) external pure returns(uint32){
        return a+b;
    }

because the lvalue type is automatically set to variable_left

ir.lvalue.set_type(ir.variable_left.type)

but this isn't always correct, because type of uint X+uint Y should be uint max(X,Y) (same for int)

@montyly montyly merged commit c6f60df into crytic:dev Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants