From 2dbf7659d7c554d3ab3875f4554b8e1e45d043af Mon Sep 17 00:00:00 2001 From: Josselin Date: Wed, 3 Mar 2021 10:26:33 +0100 Subject: [PATCH] Fix expression parsing for solc > 0.7 --- slither/solc_parsing/declarations/function.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/solc_parsing/declarations/function.py b/slither/solc_parsing/declarations/function.py index d12a6ce88..bd6fdf263 100644 --- a/slither/solc_parsing/declarations/function.py +++ b/slither/solc_parsing/declarations/function.py @@ -895,7 +895,7 @@ class FunctionSolc: return_node = self._new_node(NodeType.RETURN, statement["src"]) link_underlying_nodes(node, return_node) if self.is_compact_ast: - if statement["expression"]: + if statement.get("expression", None): return_node.add_unparsed_expression(statement["expression"]) else: if (