|
|
|
@ -3,6 +3,8 @@ |
|
|
|
|
as they should be immutable |
|
|
|
|
""" |
|
|
|
|
import copy |
|
|
|
|
|
|
|
|
|
from slither.core.expressions import UnaryOperation |
|
|
|
|
from slither.core.expressions.assignment_operation import AssignmentOperation |
|
|
|
|
from slither.core.expressions.binary_operation import BinaryOperation |
|
|
|
|
from slither.core.expressions.call_expression import CallExpression |
|
|
|
@ -112,6 +114,13 @@ class SplitTernaryExpression(object): |
|
|
|
|
true_expression.expression, |
|
|
|
|
false_expression.expression) |
|
|
|
|
|
|
|
|
|
elif isinstance(expression, UnaryOperation): |
|
|
|
|
next_expr = expression.expression |
|
|
|
|
if self.apply_copy(next_expr, true_expression, false_expression, f_expression): |
|
|
|
|
self.copy_expression(expression.expression, |
|
|
|
|
true_expression.expression, |
|
|
|
|
false_expression.expression) |
|
|
|
|
|
|
|
|
|
else: |
|
|
|
|
raise SlitherException('Ternary operation not handled {}({})'.format(expression, type(expression))) |
|
|
|
|
|
|
|
|
|