diff --git a/slither/detectors/variables/uninitialized_state_variables.py b/slither/detectors/variables/uninitialized_state_variables.py index 17d60e023..a7c6111ba 100644 --- a/slither/detectors/variables/uninitialized_state_variables.py +++ b/slither/detectors/variables/uninitialized_state_variables.py @@ -48,7 +48,7 @@ class UninitializedStateVarsDetection(AbstractDetector): def detect_uninitialized(self, contract): written_variables = self.written_variables(contract) return [(variable, contract.get_functions_reading_from_variable(variable)) - for variable in contract.state_variables if variable not in written_variables] + for variable in contract.state_variables if variable not in written_variables and not variable.expression] def detect(self): """ Detect uninitialized state variables