Fix expression parsing for solc > 0.7

pull/796/head
Josselin 4 years ago
parent d7957ea0e7
commit 2dbf7659d7
  1. 2
      slither/solc_parsing/declarations/function.py

@ -895,7 +895,7 @@ class FunctionSolc:
return_node = self._new_node(NodeType.RETURN, statement["src"]) return_node = self._new_node(NodeType.RETURN, statement["src"])
link_underlying_nodes(node, return_node) link_underlying_nodes(node, return_node)
if self.is_compact_ast: if self.is_compact_ast:
if statement["expression"]: if statement.get("expression", None):
return_node.add_unparsed_expression(statement["expression"]) return_node.add_unparsed_expression(statement["expression"])
else: else:
if ( if (

Loading…
Cancel
Save