Skip to content

Commit 8db987e

Browse files
Converge if/when branch (WhenBranch) locations onto K2 per-branch spans
The K1 frontend lowers `if`/`when` branches with their raw IR offsets collapsed onto the whole enclosing IrWhen expression, so every branch reports the same span (e.g. `stmts.kt:17:26:17:58`). K2 records per-branch spans reconstructed from the branch condition start through the result end (or just the result span for an `else` branch). Reconstruct the per-branch span from the branch's own condition/result offsets, gated on the raw branch span being collapsed onto the enclosing IrWhen (as under K1); under K2 the raw per-branch offsets already differ so the helper is a no-op. `correctedEndOffset` additionally fixes K1 recording a bare assignment's raw end at its left-hand side rather than past its right-hand value. Example (stmts.kt:17): before: 17:26:17:58 (x2, both branches collapsed onto the IrWhen) after: 17:29:17:43 and 17:50:17:58 (per-branch, matching K2) Only the K1 (test-kotlin1) expected files change; the K2 (test-kotlin2) expected files are unchanged. Controlflow expected files converge as a pure cascade of the branch-location shift. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 18a6bde commit 8db987e

11 files changed

Lines changed: 277 additions & 227 deletions

File tree

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3156,6 +3156,53 @@ open class KotlinFileExtractor(
31563156
)
31573157
}
31583158

3159+
/**
3160+
* Reconstructs the location of an `if`/`when` branch [b] (of the enclosing [IrWhen] [w])
3161+
* from the branch's own condition/result offsets, or null to leave the raw location in
3162+
* place.
3163+
*
3164+
* The K1 frontend lowers `if`/`when` branches with their raw IR offsets collapsed onto the
3165+
* whole enclosing expression, so every branch reports the same span as [w]. K2 records
3166+
* per-branch spans: the condition start through the result end, or (for an `else` branch,
3167+
* whose condition is a synthetic `true`) just the result span. Reconstruct that per-branch
3168+
* span from the branch's condition/result offsets.
3169+
*
3170+
* This only fires when the raw branch span is collapsed onto [w] (as under K1); under K2 the
3171+
* raw per-branch offsets already differ from [w], so it returns null and the raw location is
3172+
* kept. It also returns null when the reconstructed offsets are undefined, synthetic,
3173+
* inverted, or fall outside [w], so it is a strict no-op except for the collapsed case.
3174+
*/
3175+
private fun getWhenBranchLocation(w: IrWhen, b: IrBranch): Label<DbLocation>? {
3176+
if (b.startOffset != w.startOffset || b.endOffset != w.endOffset) return null
3177+
val start = if (b is IrElseBranch) b.result.startOffset else b.condition.startOffset
3178+
val end = correctedEndOffset(b.result)
3179+
if (start == UNDEFINED_OFFSET || end == UNDEFINED_OFFSET) return null
3180+
if (start == SYNTHETIC_OFFSET || end == SYNTHETIC_OFFSET) return null
3181+
if (start > end || start < w.startOffset || end > w.endOffset) return null
3182+
return tw.getLocation(start, end)
3183+
}
3184+
3185+
/**
3186+
* Returns the end offset of [e], correcting for the K1 frontend recording an assignment's
3187+
* raw end offset at its left-hand side rather than past its right-hand value. When [e] is an
3188+
* `IrSetValue`/`IrSetField` whose assigned value ends later than the assignment's own raw
3189+
* end (as under K1), the value's end offset is used; otherwise the raw end offset is kept, so
3190+
* this is a no-op under K2 (where the assignment already spans its value).
3191+
*/
3192+
private fun correctedEndOffset(e: IrExpression): Int {
3193+
val valueEnd =
3194+
when (e) {
3195+
is IrSetValue -> e.value.endOffset
3196+
is IrSetField -> e.value.endOffset
3197+
else -> UNDEFINED_OFFSET
3198+
}
3199+
return if (
3200+
valueEnd != UNDEFINED_OFFSET && valueEnd != SYNTHETIC_OFFSET && valueEnd > e.endOffset
3201+
)
3202+
valueEnd
3203+
else e.endOffset
3204+
}
3205+
31593206
private fun extractVariable(
31603207
v: IrVariable,
31613208
callable: Label<out DbCallable>,
@@ -6631,7 +6678,10 @@ open class KotlinFileExtractor(
66316678
}
66326679
e.branches.forEachIndexed { i, b ->
66336680
val bId = tw.getFreshIdLabel<DbWhenbranch>()
6634-
val bLocId = getPsiBasedLocation(b) ?: tw.getLocation(b)
6681+
val bLocId =
6682+
getWhenBranchLocation(e, b)
6683+
?: getPsiBasedLocation(b)
6684+
?: tw.getLocation(b)
66356685
tw.writeStmts_whenbranch(bId, id, i, callable)
66366686
tw.writeHasLocation(bId, bLocId)
66376687
extractExpressionExpr(b.condition, callable, bId, 0, bId)

java/ql/test-kotlin1/library-tests/classes/PrintAst.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ classes.kt:
279279
# 66| 1: [ExprStmt] <Expr>;
280280
# 66| 0: [ClassInstanceExpr] new (...)
281281
# 66| -3: [TypeAccess] Object
282-
# 65| 1: [WhenBranch] ... -> ...
282+
# 68| 1: [WhenBranch] ... -> ...
283283
# 65| 0: [BooleanLiteral] true
284284
# 68| 1: [ReturnStmt] return ...
285285
# 68| 0: [StmtExpr] <Stmt>
@@ -892,7 +892,7 @@ localClassField.kt:
892892
# 4| 1: [ExprStmt] <Expr>;
893893
# 4| 0: [ClassInstanceExpr] new L(...)
894894
# 4| -3: [TypeAccess] L
895-
# 2| 1: [WhenBranch] ... -> ...
895+
# 5| 1: [WhenBranch] ... -> ...
896896
# 2| 0: [BooleanLiteral] true
897897
# 5| 1: [BlockStmt] { ... }
898898
# 2| 3: [Method] getX
@@ -916,7 +916,7 @@ localClassField.kt:
916916
# 9| 1: [ExprStmt] <Expr>;
917917
# 9| 0: [ClassInstanceExpr] new L(...)
918918
# 9| -3: [TypeAccess] L
919-
# 7| 1: [WhenBranch] ... -> ...
919+
# 10| 1: [WhenBranch] ... -> ...
920920
# 7| 0: [BooleanLiteral] true
921921
# 10| 1: [BlockStmt] { ... }
922922
# 7| 5: [Method] getY

java/ql/test-kotlin1/library-tests/controlflow/basic/bbStmts.expected

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
| Test.kt:4:2:79:2 | Entry | 25 | Test.kt:8:3:8:16 | After var ...; |
3636
| Test.kt:4:2:79:2 | Entry | 26 | Test.kt:11:3:16:3 | <Expr>; |
3737
| Test.kt:4:2:79:2 | Entry | 27 | Test.kt:11:3:16:3 | when ... |
38-
| Test.kt:4:2:79:2 | Entry | 28 | Test.kt:11:3:16:3 | ... -> ... |
38+
| Test.kt:4:2:79:2 | Entry | 28 | Test.kt:11:7:14:3 | ... -> ... |
3939
| Test.kt:4:2:79:2 | Entry | 29 | Test.kt:11:7:11:11 | Before ... > ... |
4040
| Test.kt:4:2:79:2 | Entry | 30 | Test.kt:11:7:11:7 | x |
4141
| Test.kt:4:2:79:2 | Entry | 31 | Test.kt:11:11:11:11 | 0 |
@@ -53,13 +53,13 @@
5353
| Test.kt:11:3:16:3 | After when ... | 8 | Test.kt:18:3:18:3 | After <Expr>; |
5454
| Test.kt:11:3:16:3 | After when ... | 9 | Test.kt:21:3:24:9 | <Expr>; |
5555
| Test.kt:11:3:16:3 | After when ... | 10 | Test.kt:21:3:24:9 | when ... |
56-
| Test.kt:11:3:16:3 | After when ... | 11 | Test.kt:21:3:24:9 | ... -> ... |
56+
| Test.kt:11:3:16:3 | After when ... | 11 | Test.kt:21:6:22:9 | ... -> ... |
5757
| Test.kt:11:3:16:3 | After when ... | 12 | Test.kt:21:6:21:10 | Before ... < ... |
5858
| Test.kt:11:3:16:3 | After when ... | 13 | Test.kt:21:6:21:6 | x |
5959
| Test.kt:11:3:16:3 | After when ... | 14 | Test.kt:21:10:21:10 | 0 |
6060
| Test.kt:11:3:16:3 | After when ... | 15 | Test.kt:21:6:21:10 | ... < ... |
6161
| Test.kt:11:7:11:11 | After ... > ... [false] | 0 | Test.kt:11:7:11:11 | After ... > ... [false] |
62-
| Test.kt:11:7:11:11 | After ... > ... [false] | 1 | Test.kt:11:3:16:3 | ... -> ... |
62+
| Test.kt:11:7:11:11 | After ... > ... [false] | 1 | Test.kt:14:10:16:3 | ... -> ... |
6363
| Test.kt:11:7:11:11 | After ... > ... [false] | 2 | Test.kt:11:3:16:3 | true |
6464
| Test.kt:11:7:11:11 | After ... > ... [false] | 3 | Test.kt:11:3:16:3 | After true [true] |
6565
| Test.kt:11:7:11:11 | After ... > ... [false] | 4 | Test.kt:14:10:16:3 | { ... } |
@@ -89,7 +89,7 @@
8989
| Test.kt:11:7:11:11 | After ... > ... [true] | 15 | Test.kt:13:4:13:4 | After <Expr>; |
9090
| Test.kt:11:7:11:11 | After ... > ... [true] | 16 | Test.kt:11:14:14:3 | After { ... } |
9191
| Test.kt:21:6:21:10 | After ... < ... [false] | 0 | Test.kt:21:6:21:10 | After ... < ... [false] |
92-
| Test.kt:21:6:21:10 | After ... < ... [false] | 1 | Test.kt:21:3:24:9 | ... -> ... |
92+
| Test.kt:21:6:21:10 | After ... < ... [false] | 1 | Test.kt:24:4:24:9 | ... -> ... |
9393
| Test.kt:21:6:21:10 | After ... < ... [false] | 2 | Test.kt:21:3:24:9 | true |
9494
| Test.kt:21:6:21:10 | After ... < ... [false] | 3 | Test.kt:21:3:24:9 | After true [true] |
9595
| Test.kt:21:6:21:10 | After ... < ... [false] | 4 | Test.kt:24:4:24:9 | Before return ... |
@@ -114,7 +114,7 @@
114114
| Test.kt:21:6:21:10 | After ... < ... [true] | 16 | Test.kt:27:3:27:3 | After <Expr>; |
115115
| Test.kt:21:6:21:10 | After ... < ... [true] | 17 | Test.kt:30:3:33:3 | <Expr>; |
116116
| Test.kt:21:6:21:10 | After ... < ... [true] | 18 | Test.kt:30:3:33:3 | when ... |
117-
| Test.kt:21:6:21:10 | After ... < ... [true] | 19 | Test.kt:30:3:33:3 | ... -> ... |
117+
| Test.kt:21:6:21:10 | After ... < ... [true] | 19 | Test.kt:30:7:33:3 | ... -> ... |
118118
| Test.kt:21:6:21:10 | After ... < ... [true] | 20 | Test.kt:30:7:30:12 | Before ... (value equals) ... |
119119
| Test.kt:21:6:21:10 | After ... < ... [true] | 21 | Test.kt:30:7:30:7 | x |
120120
| Test.kt:21:6:21:10 | After ... < ... [true] | 22 | Test.kt:30:12:30:12 | 0 |
@@ -277,7 +277,7 @@
277277
| Test.kt:100:1:110:1 | Entry | 1 | Test.kt:100:25:110:1 | { ... } |
278278
| Test.kt:100:1:110:1 | Entry | 2 | Test.kt:101:5:103:5 | <Expr>; |
279279
| Test.kt:100:1:110:1 | Entry | 3 | Test.kt:101:5:103:5 | when ... |
280-
| Test.kt:100:1:110:1 | Entry | 4 | Test.kt:101:5:103:5 | ... -> ... |
280+
| Test.kt:100:1:110:1 | Entry | 4 | Test.kt:101:9:103:5 | ... -> ... |
281281
| Test.kt:100:1:110:1 | Entry | 5 | Test.kt:101:9:101:30 | ... && ... |
282282
| Test.kt:100:1:110:1 | Entry | 6 | Test.kt:101:9:101:17 | Before ... (value equals) ... |
283283
| Test.kt:100:1:110:1 | Entry | 7 | Test.kt:101:9:101:9 | x |
@@ -343,7 +343,7 @@
343343
| Test.kt:112:1:116:1 | Entry | 1 | Test.kt:112:32:116:1 | { ... } |
344344
| Test.kt:112:1:116:1 | Entry | 2 | Test.kt:113:5:115:5 | <Expr>; |
345345
| Test.kt:112:1:116:1 | Entry | 3 | Test.kt:113:5:115:5 | when ... |
346-
| Test.kt:112:1:116:1 | Entry | 4 | Test.kt:113:5:115:5 | ... -> ... |
346+
| Test.kt:112:1:116:1 | Entry | 4 | Test.kt:113:9:115:5 | ... -> ... |
347347
| Test.kt:112:1:116:1 | Entry | 5 | Test.kt:113:9:113:14 | ... && ... |
348348
| Test.kt:112:1:116:1 | Entry | 6 | Test.kt:113:9:113:9 | x |
349349
| Test.kt:113:5:115:5 | After when ... | 0 | Test.kt:113:5:115:5 | After when ... |

java/ql/test-kotlin1/library-tests/controlflow/basic/bbStrictDominance.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
| Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | Normal Exit |
2-
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:3:16:3 | ... -> ... |
32
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } |
3+
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... |
44
| Test.kt:4:13:79:2 | { ... } | Test.kt:18:3:18:3 | <Expr>; |
5-
| Test.kt:4:13:79:2 | { ... } | Test.kt:21:3:24:9 | ... -> ... |
65
| Test.kt:4:13:79:2 | { ... } | Test.kt:22:4:22:4 | <Expr>; |
6+
| Test.kt:4:13:79:2 | { ... } | Test.kt:24:4:24:9 | ... -> ... |
77
| Test.kt:4:13:79:2 | { ... } | Test.kt:30:15:33:3 | { ... } |
88
| Test.kt:4:13:79:2 | { ... } | Test.kt:35:3:35:3 | <Expr>; |
99
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:9:38:9 | x |
1010
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:16:41:3 | { ... } |
1111
| Test.kt:4:13:79:2 | { ... } | Test.kt:43:3:43:3 | <Expr>; |
1212
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:4:2:79:2 | Normal Exit |
13-
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:21:3:24:9 | ... -> ... |
1413
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:22:4:22:4 | <Expr>; |
14+
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
1515
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
1616
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:35:3:35:3 | <Expr>; |
1717
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:38:9:38:9 | x |

java/ql/test-kotlin1/library-tests/controlflow/basic/bbSuccessor.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:3:16:3 | ... -> ... |
21
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } |
3-
| Test.kt:11:3:16:3 | ... -> ... | Test.kt:18:3:18:3 | <Expr>; |
2+
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... |
43
| Test.kt:11:14:14:3 | { ... } | Test.kt:18:3:18:3 | <Expr>; |
5-
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:21:3:24:9 | ... -> ... |
4+
| Test.kt:14:10:16:3 | ... -> ... | Test.kt:18:3:18:3 | <Expr>; |
65
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:22:4:22:4 | <Expr>; |
7-
| Test.kt:21:3:24:9 | ... -> ... | Test.kt:4:2:79:2 | Normal Exit |
6+
| Test.kt:18:3:18:3 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
87
| Test.kt:22:4:22:4 | <Expr>; | Test.kt:30:7:30:12 | After ... (value equals) ... [false] |
98
| Test.kt:22:4:22:4 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
9+
| Test.kt:24:4:24:9 | ... -> ... | Test.kt:4:2:79:2 | Normal Exit |
1010
| Test.kt:30:7:30:12 | After ... (value equals) ... [false] | Test.kt:35:3:35:3 | <Expr>; |
1111
| Test.kt:30:15:33:3 | { ... } | Test.kt:35:3:35:3 | <Expr>; |
1212
| Test.kt:35:3:35:3 | <Expr>; | Test.kt:38:9:38:9 | x |

java/ql/test-kotlin1/library-tests/controlflow/basic/getASuccessor.expected

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
| Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt | Test.kt:8:16:8:16 | 0 | IntegerLiteral |
2020
| Test.kt:8:3:8:16 | w | LocalVariableDeclExpr | Test.kt:11:3:16:3 | <Expr>; | ExprStmt |
2121
| Test.kt:8:16:8:16 | 0 | IntegerLiteral | Test.kt:8:3:8:16 | w | LocalVariableDeclExpr |
22-
| Test.kt:11:3:16:3 | ... -> ... | WhenBranch | Test.kt:11:3:16:3 | true | BooleanLiteral |
23-
| Test.kt:11:3:16:3 | ... -> ... | WhenBranch | Test.kt:11:7:11:7 | x | VarAccess |
2422
| Test.kt:11:3:16:3 | <Expr>; | ExprStmt | Test.kt:11:3:16:3 | when ... | WhenExpr |
2523
| Test.kt:11:3:16:3 | true | BooleanLiteral | Test.kt:14:10:16:3 | { ... } | BlockStmt |
26-
| Test.kt:11:3:16:3 | when ... | WhenExpr | Test.kt:11:3:16:3 | ... -> ... | WhenBranch |
24+
| Test.kt:11:3:16:3 | when ... | WhenExpr | Test.kt:11:7:14:3 | ... -> ... | WhenBranch |
2725
| Test.kt:11:7:11:7 | x | VarAccess | Test.kt:11:11:11:11 | 0 | IntegerLiteral |
28-
| Test.kt:11:7:11:11 | ... > ... | GTExpr | Test.kt:11:3:16:3 | ... -> ... | WhenBranch |
2926
| Test.kt:11:7:11:11 | ... > ... | GTExpr | Test.kt:11:14:14:3 | { ... } | BlockStmt |
27+
| Test.kt:11:7:11:11 | ... > ... | GTExpr | Test.kt:14:10:16:3 | ... -> ... | WhenBranch |
28+
| Test.kt:11:7:14:3 | ... -> ... | WhenBranch | Test.kt:11:7:11:7 | x | VarAccess |
3029
| Test.kt:11:11:11:11 | 0 | IntegerLiteral | Test.kt:11:7:11:11 | ... > ... | GTExpr |
3130
| Test.kt:11:14:14:3 | { ... } | BlockStmt | Test.kt:12:4:12:4 | <Expr>; | ExprStmt |
3231
| Test.kt:12:4:12:4 | <Expr>; | ExprStmt | Test.kt:12:4:12:4 | y | VarAccess |
@@ -37,6 +36,7 @@
3736
| Test.kt:13:4:13:4 | z | VarAccess | Test.kt:13:8:13:9 | 10 | IntegerLiteral |
3837
| Test.kt:13:4:13:9 | ...=... | AssignExpr | Test.kt:18:3:18:3 | <Expr>; | ExprStmt |
3938
| Test.kt:13:8:13:9 | 10 | IntegerLiteral | Test.kt:13:4:13:9 | ...=... | AssignExpr |
39+
| Test.kt:14:10:16:3 | ... -> ... | WhenBranch | Test.kt:11:3:16:3 | true | BooleanLiteral |
4040
| Test.kt:14:10:16:3 | { ... } | BlockStmt | Test.kt:15:4:15:4 | <Expr>; | ExprStmt |
4141
| Test.kt:15:4:15:4 | <Expr>; | ExprStmt | Test.kt:15:4:15:4 | y | VarAccess |
4242
| Test.kt:15:4:15:4 | y | VarAccess | Test.kt:15:8:15:9 | 30 | LongLiteral |
@@ -46,31 +46,31 @@
4646
| Test.kt:18:3:18:3 | z | VarAccess | Test.kt:18:7:18:7 | 0 | IntegerLiteral |
4747
| Test.kt:18:3:18:7 | ...=... | AssignExpr | Test.kt:21:3:24:9 | <Expr>; | ExprStmt |
4848
| Test.kt:18:7:18:7 | 0 | IntegerLiteral | Test.kt:18:3:18:7 | ...=... | AssignExpr |
49-
| Test.kt:21:3:24:9 | ... -> ... | WhenBranch | Test.kt:21:3:24:9 | true | BooleanLiteral |
50-
| Test.kt:21:3:24:9 | ... -> ... | WhenBranch | Test.kt:21:6:21:6 | x | VarAccess |
5149
| Test.kt:21:3:24:9 | <Expr>; | ExprStmt | Test.kt:21:3:24:9 | when ... | WhenExpr |
5250
| Test.kt:21:3:24:9 | true | BooleanLiteral | Test.kt:24:4:24:9 | INSTANCE | VarAccess |
53-
| Test.kt:21:3:24:9 | when ... | WhenExpr | Test.kt:21:3:24:9 | ... -> ... | WhenBranch |
51+
| Test.kt:21:3:24:9 | when ... | WhenExpr | Test.kt:21:6:22:9 | ... -> ... | WhenBranch |
5452
| Test.kt:21:6:21:6 | x | VarAccess | Test.kt:21:10:21:10 | 0 | IntegerLiteral |
55-
| Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:21:3:24:9 | ... -> ... | WhenBranch |
5653
| Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:22:4:22:4 | <Expr>; | ExprStmt |
54+
| Test.kt:21:6:21:10 | ... < ... | LTExpr | Test.kt:24:4:24:9 | ... -> ... | WhenBranch |
55+
| Test.kt:21:6:22:9 | ... -> ... | WhenBranch | Test.kt:21:6:21:6 | x | VarAccess |
5756
| Test.kt:21:10:21:10 | 0 | IntegerLiteral | Test.kt:21:6:21:10 | ... < ... | LTExpr |
5857
| Test.kt:22:4:22:4 | <Expr>; | ExprStmt | Test.kt:22:4:22:4 | y | VarAccess |
5958
| Test.kt:22:4:22:4 | y | VarAccess | Test.kt:22:8:22:9 | 40 | LongLiteral |
6059
| Test.kt:22:4:22:9 | ...=... | AssignExpr | Test.kt:27:3:27:3 | <Expr>; | ExprStmt |
6160
| Test.kt:22:8:22:9 | 40 | LongLiteral | Test.kt:22:4:22:9 | ...=... | AssignExpr |
61+
| Test.kt:24:4:24:9 | ... -> ... | WhenBranch | Test.kt:21:3:24:9 | true | BooleanLiteral |
6262
| Test.kt:24:4:24:9 | INSTANCE | VarAccess | Test.kt:24:4:24:9 | return ... | ReturnStmt |
6363
| Test.kt:24:4:24:9 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Normal Exit | Method |
6464
| Test.kt:27:3:27:3 | <Expr>; | ExprStmt | Test.kt:27:3:27:3 | z | VarAccess |
6565
| Test.kt:27:3:27:3 | z | VarAccess | Test.kt:27:7:27:8 | 10 | IntegerLiteral |
6666
| Test.kt:27:3:27:8 | ...=... | AssignExpr | Test.kt:30:3:33:3 | <Expr>; | ExprStmt |
6767
| Test.kt:27:7:27:8 | 10 | IntegerLiteral | Test.kt:27:3:27:8 | ...=... | AssignExpr |
68-
| Test.kt:30:3:33:3 | ... -> ... | WhenBranch | Test.kt:30:7:30:7 | x | VarAccess |
6968
| Test.kt:30:3:33:3 | <Expr>; | ExprStmt | Test.kt:30:3:33:3 | when ... | WhenExpr |
70-
| Test.kt:30:3:33:3 | when ... | WhenExpr | Test.kt:30:3:33:3 | ... -> ... | WhenBranch |
69+
| Test.kt:30:3:33:3 | when ... | WhenExpr | Test.kt:30:7:33:3 | ... -> ... | WhenBranch |
7170
| Test.kt:30:7:30:7 | x | VarAccess | Test.kt:30:12:30:12 | 0 | IntegerLiteral |
7271
| Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | Test.kt:30:15:33:3 | { ... } | BlockStmt |
7372
| Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr | Test.kt:35:3:35:3 | <Expr>; | ExprStmt |
73+
| Test.kt:30:7:33:3 | ... -> ... | WhenBranch | Test.kt:30:7:30:7 | x | VarAccess |
7474
| Test.kt:30:12:30:12 | 0 | IntegerLiteral | Test.kt:30:7:30:12 | ... (value equals) ... | ValueEQExpr |
7575
| Test.kt:30:15:33:3 | { ... } | BlockStmt | Test.kt:31:4:31:4 | <Expr>; | ExprStmt |
7676
| Test.kt:31:4:31:4 | <Expr>; | ExprStmt | Test.kt:31:4:31:4 | y | VarAccess |
@@ -165,13 +165,13 @@
165165
| Test.kt:100:1:110:1 | Exceptional Exit | Method | Test.kt:100:1:110:1 | Exit | Method |
166166
| Test.kt:100:1:110:1 | Normal Exit | Method | Test.kt:100:1:110:1 | Exit | Method |
167167
| Test.kt:100:25:110:1 | { ... } | BlockStmt | Test.kt:101:5:103:5 | <Expr>; | ExprStmt |
168-
| Test.kt:101:5:103:5 | ... -> ... | WhenBranch | Test.kt:101:9:101:30 | ... && ... | AndLogicalExpr |
169168
| Test.kt:101:5:103:5 | <Expr>; | ExprStmt | Test.kt:101:5:103:5 | when ... | WhenExpr |
170-
| Test.kt:101:5:103:5 | when ... | WhenExpr | Test.kt:101:5:103:5 | ... -> ... | WhenBranch |
169+
| Test.kt:101:5:103:5 | when ... | WhenExpr | Test.kt:101:9:103:5 | ... -> ... | WhenBranch |
171170
| Test.kt:101:9:101:9 | x | VarAccess | Test.kt:101:14:101:17 | null | NullLiteral |
172171
| Test.kt:101:9:101:17 | ... (value equals) ... | ValueEQExpr | Test.kt:101:22:101:22 | y | VarAccess |
173172
| Test.kt:101:9:101:17 | ... (value equals) ... | ValueEQExpr | Test.kt:105:5:109:5 | <Expr>; | ExprStmt |
174173
| Test.kt:101:9:101:30 | ... && ... | AndLogicalExpr | Test.kt:101:9:101:9 | x | VarAccess |
174+
| Test.kt:101:9:103:5 | ... -> ... | WhenBranch | Test.kt:101:9:101:30 | ... && ... | AndLogicalExpr |
175175
| Test.kt:101:14:101:17 | null | NullLiteral | Test.kt:101:9:101:17 | ... (value equals) ... | ValueEQExpr |
176176
| Test.kt:101:22:101:22 | y | VarAccess | Test.kt:101:27:101:30 | null | NullLiteral |
177177
| Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr | Test.kt:101:33:103:5 | { ... } | BlockStmt |
@@ -203,12 +203,12 @@
203203
| Test.kt:112:1:116:1 | Entry | Method | Test.kt:112:32:116:1 | { ... } | BlockStmt |
204204
| Test.kt:112:1:116:1 | Normal Exit | Method | Test.kt:112:1:116:1 | Exit | Method |
205205
| Test.kt:112:32:116:1 | { ... } | BlockStmt | Test.kt:113:5:115:5 | <Expr>; | ExprStmt |
206-
| Test.kt:113:5:115:5 | ... -> ... | WhenBranch | Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr |
207206
| Test.kt:113:5:115:5 | <Expr>; | ExprStmt | Test.kt:113:5:115:5 | when ... | WhenExpr |
208-
| Test.kt:113:5:115:5 | when ... | WhenExpr | Test.kt:113:5:115:5 | ... -> ... | WhenBranch |
207+
| Test.kt:113:5:115:5 | when ... | WhenExpr | Test.kt:113:9:115:5 | ... -> ... | WhenBranch |
209208
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:112:1:116:1 | Normal Exit | Method |
210209
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:113:14:113:14 | y | VarAccess |
211210
| Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr | Test.kt:113:9:113:9 | x | VarAccess |
211+
| Test.kt:113:9:115:5 | ... -> ... | WhenBranch | Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr |
212212
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:112:1:116:1 | Normal Exit | Method |
213213
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:113:17:115:5 | { ... } | BlockStmt |
214214
| Test.kt:113:17:115:5 | { ... } | BlockStmt | Test.kt:112:1:116:1 | Normal Exit | Method |

0 commit comments

Comments
 (0)