From f92cb37a400f9ddf72f4d48ebfc5a786de5236fc Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 3 Jan 2023 09:49:50 -0600 Subject: [PATCH] only check for local alias if foreign isn't dict --- slither/solc_parsing/slither_compilation_unit_solc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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