diff --git a/slither/solc_parsing/solidity_types/type_parsing.py b/slither/solc_parsing/solidity_types/type_parsing.py index 6ca015127..db610d8a2 100644 --- a/slither/solc_parsing/solidity_types/type_parsing.py +++ b/slither/solc_parsing/solidity_types/type_parsing.py @@ -209,6 +209,9 @@ def parse_type( t: Union[Dict, UnknownType], caller_context: Union[CallerContextExpression, "SlitherCompilationUnitSolc"], ) -> Type: + print("parse_type") + print(t) + print(type(caller_context)) """ caller_context can be a SlitherCompilationUnitSolc because we recursively call the function and go up in the context's scope. If we are really lost we just go over the SlitherCompilationUnitSolc @@ -293,7 +296,7 @@ def parse_type( scope = custom_error.contract.file_scope sl = caller_context.compilation_unit - next_context = caller_context.slither_parser + next_context = caller_context structures_direct_access = list(scope.structures.values()) all_structuress = [c.structures for c in scope.contracts.values()] all_structures = [item for sublist in all_structuress for item in sublist] @@ -450,6 +453,7 @@ def parse_type( if is_compact_ast: mappingFrom = parse_type(t["keyType"], next_context) + print(type(caller_context)) mappingTo = parse_type(t["valueType"], next_context) else: assert len(t["children"]) == 2