Skip to content

Commit

Permalink
Parse local variables prior parsing modifier (fix 99)
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly committed Dec 11, 2018
1 parent f70fe60 commit a4032dc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions slither/solc_parsing/declarations/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,11 +804,12 @@ def analyze_content(self):
if child[self.get_key()] == 'Block':
self._is_implemented = True
self._parse_cfg(child)
continue

assert child[self.get_key()] == 'ModifierInvocation'

self._parse_modifier(child)

# Parse modifier after parsing all the block
# In the case a local variable is used in the modifier
for child in children[2:]:
if child[self.get_key()] == 'ModifierInvocation':
self._parse_modifier(child)

for local_vars in self.variables:
local_vars.analyze(self)
Expand Down

0 comments on commit a4032dc

Please sign in to comment.