diff --git a/slither/solc_parsing/slither_compilation_unit_solc.py b/slither/solc_parsing/slither_compilation_unit_solc.py index 5c93d5f1d..05dc4113b 100644 --- a/slither/solc_parsing/slither_compilation_unit_solc.py +++ b/slither/solc_parsing/slither_compilation_unit_solc.py @@ -57,7 +57,7 @@ def _handle_import_aliases( # This path should only be hit for the malformed AST of solc 0.5.12 where # the foreign identifier cannot be found but is required to resolve the alias. # see https://github.com/crytic/slither/issues/1319 - if symbol_alias["local"]: + elif symbol_alias["local"]: raise SlitherException( "Cannot resolve local alias for import directive due to malformed AST. Please upgrade to solc 0.6.0 or higher." ) @@ -395,6 +395,7 @@ Please rename it, this name is reserved for Slither's internals""" ) self._contracts_by_id[contract.id] = contract self._compilation_unit.contracts.append(contract) + # Update of the inheritance for contract_parser in self._underlying_contract_to_parser.values(): # remove the first elem in linearizedBaseContracts as it is the contract itself