File tree Expand file tree Collapse file tree
test/kotlin/library-tests/controlflow/basic Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ private module ControlFlowGraphImpl {
286286 * That is, contexts where the control-flow edges depend on `value` given that `b` ends
287287 * with a `booleanCompletion(value, _)`.
288288 */
289- private predicate inBooleanContext ( Expr b ) {
289+ private predicate inBooleanContext ( ControlFlowNode b ) {
290290 exists ( LogicExpr logexpr |
291291 logexpr .( BinaryExpr ) .getLeftOperand ( ) = b
292292 or
@@ -316,6 +316,10 @@ private module ControlFlowGraphImpl {
316316 inBooleanContext ( whenexpr ) and
317317 whenexpr .getBranch ( _) .getAResult ( ) = b
318318 )
319+ or
320+ inBooleanContext ( b .( ExprStmt ) .getExpr ( ) )
321+ or
322+ inBooleanContext ( b .( StmtExpr ) .getStmt ( ) )
319323 }
320324
321325 /**
Original file line number Diff line number Diff line change 4141| Test.kt:100:25:110:1 | { ... } | Test.kt:105:20:107:5 | { ... } |
4242| Test.kt:100:25:110:1 | { ... } | Test.kt:107:16:109:5 | ... -> ... |
4343| Test.kt:100:25:110:1 | { ... } | Test.kt:107:27:109:5 | { ... } |
44+ | Test.kt:101:22:101:30 | <Expr>; | Test.kt:101:33:103:5 | { ... } |
4445| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
4546| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:16:109:5 | ... -> ... |
4647| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:27:109:5 | { ... } |
Original file line number Diff line number Diff line change 2323| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | t2 |
2424| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:30 | ... -> ... |
2525| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:30 | <Expr>; |
26- | Test.kt:101:22:101:30 | ... -> ... | Test.kt:101:33:103:5 | { ... } |
2726| Test.kt:101:22:101:30 | ... -> ... | Test.kt:105:5:109:5 | <Expr>; |
2827| Test.kt:101:22:101:30 | <Expr>; | Test.kt:101:33:103:5 | { ... } |
2928| Test.kt:101:22:101:30 | <Expr>; | Test.kt:105:5:109:5 | <Expr>; |
Original file line number Diff line number Diff line change 188188| Test.kt:101:22:101:30 | ... -> ... | WhenBranch | Test.kt:101:22:101:30 | true | BooleanLiteral |
189189| Test.kt:101:22:101:30 | <Expr>; | ExprStmt | Test.kt:101:22:101:22 | y | VarAccess |
190190| Test.kt:101:22:101:30 | <Expr>; | ExprStmt | Test.kt:101:22:101:30 | false | BooleanLiteral |
191- | Test.kt:101:22:101:30 | false | BooleanLiteral | Test.kt:101:33:103:5 | { ... } | BlockStmt |
192191| Test.kt:101:22:101:30 | false | BooleanLiteral | Test.kt:105:5:109:5 | <Expr>; | ExprStmt |
193192| Test.kt:101:22:101:30 | true | BooleanLiteral | Test.kt:101:22:101:30 | <Expr>; | ExprStmt |
194193| Test.kt:101:27:101:30 | null | NullLiteral | Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr |
Original file line number Diff line number Diff line change 543543| Test.kt:101:9:101:30 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
544544| Test.kt:101:9:101:30 | ... -> ... | Test.kt:108:9:108:29 | <Expr>; |
545545| Test.kt:101:22:101:30 | ... -> ... | Test.kt:101:22:101:30 | <Expr>; |
546+ | Test.kt:101:22:101:30 | <Expr>; | Test.kt:101:33:103:5 | { ... } |
547+ | Test.kt:101:22:101:30 | <Expr>; | Test.kt:102:9:102:25 | throw ... |
546548| Test.kt:101:33:103:5 | { ... } | Test.kt:102:9:102:25 | throw ... |
547549| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:9:107:5 | ... -> ... |
548550| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
Original file line number Diff line number Diff line change 212212| Test.kt:101:9:101:30 | ... -> ... | Test.kt:101:5:103:5 | <Expr>; |
213213| Test.kt:101:22:101:30 | <Expr>; | Test.kt:101:22:101:30 | ... -> ... |
214214| Test.kt:102:9:102:25 | throw ... | Test.kt:101:33:103:5 | { ... } |
215+ | Test.kt:105:5:109:5 | <Expr>; | Test.kt:101:22:101:30 | ... -> ... |
216+ | Test.kt:105:5:109:5 | <Expr>; | Test.kt:101:22:101:30 | <Expr>; |
217+ | Test.kt:105:9:107:5 | ... -> ... | Test.kt:101:22:101:30 | ... -> ... |
218+ | Test.kt:105:9:107:5 | ... -> ... | Test.kt:101:22:101:30 | <Expr>; |
215219| Test.kt:105:9:107:5 | ... -> ... | Test.kt:105:5:109:5 | <Expr>; |
216220| Test.kt:106:9:106:29 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
217221| Test.kt:108:9:108:29 | <Expr>; | Test.kt:107:27:109:5 | { ... } |
You can’t perform that action at this time.
0 commit comments