Kotlin: WhenBranch isn't postorder

This commit is contained in:
Ian Lynagh
2021-10-28 12:55:23 +01:00
parent c4880cc935
commit d247e4fcff

View File

@@ -478,8 +478,6 @@ private module ControlFlowGraphImpl {
this instanceof LocalTypeDeclStmt
or
this instanceof AssertStmt
or
this instanceof WhenBranch
}
/** Gets child nodes in their order of execution. Indexing starts at either -1 or 0. */
@@ -593,6 +591,8 @@ private module ControlFlowGraphImpl {
or
result = n and n instanceof WhenExpr
or
result = n and n instanceof WhenBranch
or
result = n and n.(PostOrderNode).isLeafNode()
or
result = first(n.(PostOrderNode).firstChild())