mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Merge pull request #9647 from tamasvajk/kotlin-when-branch-encl-stmt
Kotlin: Fix enclosing statement of `when` branches
This commit is contained in:
@@ -29,7 +29,8 @@ class Stmt extends StmtParent, ExprParent, @stmt {
|
||||
*/
|
||||
Stmt getEnclosingStmt() {
|
||||
result = this.getParent() or
|
||||
result = this.getParent().(SwitchExpr).getEnclosingStmt()
|
||||
result = this.getParent().(SwitchExpr).getEnclosingStmt() or
|
||||
result = this.getParent().(WhenExpr).getEnclosingStmt()
|
||||
}
|
||||
|
||||
/** Holds if this statement is the child of the specified parent at the specified (zero-based) position. */
|
||||
|
||||
Reference in New Issue
Block a user