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

UnaryOperation: -variable and +variable doesn't make variable an lvalue #2027

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

SheldonHolmgren
Copy link
Contributor

Small bugfix for UnaryOperation. Until now in code like this:

function some_view() view returns (int) {
    return -someParameter;
}

Slither believes that someParameter is an lvalue. One of the results is that slither.visitors.expression.write_var believes that someParameter is written to.

I'm happy to add some test if needed.

@0xalpharush 0xalpharush merged commit d86bd41 into crytic:dev Aug 3, 2023
@0xalpharush
Copy link
Contributor

Thanks @SheldonHolmgren!

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