Skip to content

Commit

Permalink
Fix KE1 to extract the new when condition constructs
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasvajk committed Nov 22, 2024
1 parent a2d90ed commit 052a243
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6274,7 +6274,12 @@ 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, bId)

val condId = tw.getFreshIdLabel<DbWhenbranchcondition>()
tw.writeStmts_whenbranchcondition(condId, bId, 0, callable)
tw.writeHasLocation(id, bLocId)
tw.writeWhen_branch_condition_with_expr(condId)
extractExpressionExpr(b.condition, callable, condId, 0, condId)
extractExpressionStmt(b.result, callable, bId, 1)
if (b is IrElseBranch) {
tw.writeWhen_branch_else(bId)
Expand Down

0 comments on commit 052a243

Please sign in to comment.