Improve test on tuple_index existence

pull/564/head
Josselin 4 years ago
parent a6a4d8ddc5
commit 37d2967e9d
  1. 2
      slither/visitors/slithir/expression_to_slithir.py

@ -129,7 +129,7 @@ class ExpressionToSlithIR(ExpressionVisitor):
if not left[idx] is None:
index = idx
# The following test is probably always true?
if isinstance(left[idx], LocalVariableInitFromTuple) and left[idx].tuple_index:
if isinstance(left[idx], LocalVariableInitFromTuple) and left[idx].tuple_index is not None:
index = left[idx].tuple_index
operation = Unpack(left[idx], right, index)
operation.set_expression(expression)

Loading…
Cancel
Save