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

Min/max support for enum types #1276

Merged
merged 1 commit into from
Jul 25, 2022
Merged

Min/max support for enum types #1276

merged 1 commit into from
Jul 25, 2022

Conversation

0xalpharush
Copy link
Member

@0xalpharush 0xalpharush commented Jul 7, 2022

Closes #951
In addition, this fixes the min value on elementary types.
The min branch wasn't being hit before:

        Function test.f() (*)
                Expression: a = type()(uint256).min
                IRs:
                        TMP_5(uint256) := 115792089237316195423570985008687907853269984665640564039457584007913129639935(uint256)
                        a(uint256) := TMP_5(uint256)

With this PR's changes:

        Function test.f() (*)
                Expression: a = type()(uint256).min
                IRs:
                        TMP_7(uint256) := 0(uint256)
                        a(uint256) := TMP_7(uint256)

@montyly montyly merged commit 98e6d8c into dev Jul 25, 2022
@montyly montyly deleted the minmax branch July 25, 2022 14:01
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

2 participants