Improve support for constant variables init

pull/74/head
Josselin 6 years ago
parent c40776121a
commit 916cbf7acf
  1. 5
      slither/solc_parsing/declarations/contract.py

@ -234,9 +234,14 @@ class ContractSolc04(Contract):
self._variables[var.name] = var self._variables[var.name] = var
def analyze_constant_state_variables(self): def analyze_constant_state_variables(self):
from slither.solc_parsing.expressions.expression_parsing import VariableNotFound
for var in self.variables: for var in self.variables:
if var.is_constant: if var.is_constant:
# cant parse constant expression based on function calls
try:
var.analyze(self) var.analyze(self)
except VariableNotFound:
pass
return return
def analyze_state_variables(self): def analyze_state_variables(self):

Loading…
Cancel
Save