Parse local variables prior parsing modifier (fix 99)

pull/108/head
Josselin 6 years ago
parent f70fe60b1d
commit a4032dc000
  1. 7
      slither/solc_parsing/declarations/function.py

@ -804,10 +804,11 @@ class FunctionSolc(Function):
if child[self.get_key()] == 'Block':
self._is_implemented = True
self._parse_cfg(child)
continue
assert child[self.get_key()] == 'ModifierInvocation'
# 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:

Loading…
Cancel
Save