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

Remove assertion in unary operation #1856

Merged
merged 2 commits into from
May 5, 2023
Merged

Remove assertion in unary operation #1856

merged 2 commits into from
May 5, 2023

Conversation

smonicas
Copy link
Contributor

Remove an assertion that is not needed and prevent valid use cases such as negating an element of an array.

pragma solidity 0.8.19;

contract D {
 function a(int256[] memory data) public pure {
    -data[0];
 }
}

@montyly
Copy link
Member

montyly commented Apr 25, 2023

can we add this example as a test?

@montyly montyly merged commit df0b7ce into dev May 5, 2023
37 checks passed
@montyly montyly deleted the dev-remove-assertion branch May 5, 2023 07:11
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.

None yet

3 participants