diff --git a/slither/core/cfg/node.py b/slither/core/cfg/node.py index 094b78dc8..f8dbe87ce 100644 --- a/slither/core/cfg/node.py +++ b/slither/core/cfg/node.py @@ -650,13 +650,13 @@ class Node(SourceMapping, ChildFunction): @property def son_true(self) -> Optional["Node"]: - if self.type == NodeType.IF or self.type == NodeType.IFLOOP: + if self.type in [NodeType.IF, NodeType.IFLOOP]: return self._sons[0] return None @property def son_false(self) -> Optional["Node"]: - if (self.type == NodeType.IF or self.type == NodeType.IFLOOP) and len(self._sons) >= 1: + if self.type in [NodeType.IF, NodeType.IFLOOP] and len(self._sons) >= 1: return self._sons[1] return None