Add check ElementaryTypeNameExpression in copy_expression

pull/1282/head
Vladislav Volosnikov 2 years ago
parent d0a4f5595d
commit a4a139ecaa
  1. 6
      slither/utils/expression_manipulations.py

@ -9,6 +9,7 @@ from slither.core.expressions.assignment_operation import AssignmentOperation
from slither.core.expressions.binary_operation import BinaryOperation
from slither.core.expressions.call_expression import CallExpression
from slither.core.expressions.conditional_expression import ConditionalExpression
from slither.core.expressions.elementary_type_name_expression import ElementaryTypeNameExpression
from slither.core.expressions.expression import Expression
from slither.core.expressions.identifier import Identifier
from slither.core.expressions.index_access import IndexAccess
@ -80,7 +81,10 @@ class SplitTernaryExpression:
if isinstance(expression, ConditionalExpression):
raise SlitherException("Nested ternary operator not handled")
if isinstance(expression, (Literal, Identifier, IndexAccess, NewArray, NewContract)):
if isinstance(
expression,
(Literal, Identifier, IndexAccess, NewArray, NewContract, ElementaryTypeNameExpression),
):
return
# case of lib

Loading…
Cancel
Save