Node.son_true/son_false: minor

pull/524/head
Josselin 4 years ago
parent 955ad39d74
commit dfe0e657f5
  1. 4
      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

Loading…
Cancel
Save