return_values/return_values_ssa: Remove dupplicate

pull/217/head
Josselin 6 years ago
parent 5bf963b35d
commit 404a2ad72d
  1. 4
      slither/core/declarations/function.py

@ -482,7 +482,7 @@ class Function(ChildContract, SourceMapping):
return_values = list()
returns = [n for n in self.nodes if n.type == NodeType.RETURN]
[return_values.extend(ir.values) for node in returns for ir in node.irs if isinstance(ir, Return)]
self._return_values = return_values
self._return_values = list(set(return_values))
return self._return_values
@property
@ -497,7 +497,7 @@ class Function(ChildContract, SourceMapping):
return_values_ssa = list()
returns = [n for n in self.nodes if n.type == NodeType.RETURN]
[return_values_ssa.extend(ir.values) for node in returns for ir in node.irs_ssa if isinstance(ir, Return)]
self._return_values_ssa = return_values_ssa
self._return_values_ssa = list(set(return_values_ssa))
return self._return_values_ssa
# endregion

Loading…
Cancel
Save