diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 27aac21bb..2c98b4c79 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -914,7 +914,12 @@ class Node(SourceMapping, ChildFunction): ################################################################################### def __str__(self): - txt = NodeType.str(self._node_type) + ' ' + str(self.expression) + additional_info = '' + if self.expression: + additional_info += ' ' + str(self.expression) + elif self.variable_declaration: + additional_info += ' ' + str(self.variable_declaration) + txt = NodeType.str(self._node_type) + additional_info return txt # endregion