-
Notifications
You must be signed in to change notification settings - Fork 18
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
Exponentiation should have a different prioritisation for solidity version bellow 0.8.0
#1031
Comments
@OmarTawfik this is probably correct: We currently define the 0.6.0 as the version that changed this: slang/crates/solidity/inputs/language/src/definition.rs Lines 3359 to 3374 in 0630345
However, looking at the commits upstream, it seems that 0.8.0 is only the version that changed the associativity itself: ethereum/solidity@13e7012. What has changed in 0.6.0 are the type semantics, where the type of the base is used for the result, rather than the operand's: ethereum/solidity@33f7f96. |
originally Solidity's exponentiation had left associativity which was fixed at
0.8.0
.If I set the compiler bellow
0.8.0
I expect the output ofa ** b ** c
to resemble the following:Instead I the parser returns something like:
This is just a simplification of the actual result but it helps as a guide.
UPDATE:
With further testing
0.5.8
works as expected while0.7.0
has this bug. Will need to investigate further to figure out in which versions this doesn't work properly.The text was updated successfully, but these errors were encountered: