-
Notifications
You must be signed in to change notification settings - Fork 979
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
Call value ternary #1501
Call value ternary #1501
Conversation
if isinstance(next_expr.expression_right, ConditionalExpression): | ||
next_expr = _handle_ternary_access( | ||
next_expr, true_expression, false_expression | ||
# TODO: can we get rid of `NoneType` expressions in `TupleExpression`? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, my intuition tells me that could happen with unnamed tuple (ex: (,,,) = f()
). Through I haven't tested, so I could be wrong
self.copy_expression( | ||
next_expr, true_expression.expression, false_expression.expression | ||
) | ||
|
||
# pylint: disable=too-many-nested-blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move part of the function's logic into internal functions?
This would reduce the code complexity, and allows us to remove this warning
Close [Bug-Candidate]: Ternary operation not handled None(<class 'NoneType'>) #1153, close [Bug]: Ternary operation not handled bytes #1371, close [Bug-Candidate]: Support concat functionality of dynamic sized arrays - Solidity ^0.8.12 #1198
Replace Unused ternary param #1217