Fix incorrect modifier parsing

pull/517/head
Josselin 4 years ago
parent 02cd197af2
commit 7dbb1d4964
  1. 2
      slither/solc_parsing/declarations/function.py

@ -1051,7 +1051,7 @@ class FunctionSolc:
node_parser.add_unparsed_expression(modifier) node_parser.add_unparsed_expression(modifier)
# The latest entry point is the entry point, or the latest modifier call # The latest entry point is the entry point, or the latest modifier call
if self._function.modifiers: if self._function.modifiers:
latest_entry_point = self._function.modifiers[-1].nodes[-1] latest_entry_point = self._function.modifiers_statements[-1].nodes[-1]
else: else:
latest_entry_point = self._function.entry_point latest_entry_point = self._function.entry_point
insert_node(latest_entry_point, node_parser.underlying_node) insert_node(latest_entry_point, node_parser.underlying_node)

Loading…
Cancel
Save