Fix AST representation of WhenExpr and WhenBranch

This commit is contained in:
Tony Torralba
2022-03-08 12:17:44 +01:00
committed by Ian Lynagh
parent 4b22e1a378
commit 64531dd717
8 changed files with 199 additions and 82 deletions

View File

@@ -2413,7 +2413,7 @@ open class KotlinFileExtractor(
val bLocId = tw.getLocation(b)
tw.writeStmts_whenbranch(bId, id, i, callable)
tw.writeHasLocation(bId, bLocId)
extractExpressionExpr(b.condition, callable, bId, 0, exprParent.enclosingStmt)
extractExpressionExpr(b.condition, callable, bId, 0, bId)
extractExpressionStmt(b.result, callable, bId, 1)
if(b is IrElseBranch) {
tw.writeWhen_branch_else(bId)