Improve error handling in case of contract's name dupplicate

pull/429/head
Josselin 5 years ago
parent 9da3fdafb4
commit 8ba09c92f7
  1. 6
      slither/solc_parsing/declarations/contract.py

@ -560,7 +560,13 @@ class ContractSolc04(Contract):
def convert_expression_to_slithir(self): def convert_expression_to_slithir(self):
for func in self.functions + self.modifiers: for func in self.functions + self.modifiers:
try:
func.generate_slithir_and_analyze() func.generate_slithir_and_analyze()
except AttributeError:
# This can happens for example if there is a call to an interface
# And the interface is redefined due to contract's name reuse
# But the available version misses some functions
self.log_incorrect_parsing(f'Impossible to generate IR for {self.name}.{func.name}')
all_ssa_state_variables_instances = dict() all_ssa_state_variables_instances = dict()

Loading…
Cancel
Save