Skip to content

Commit d8d5197

Browse files
authored
Don't collect constants from every assignment statement (#2558)
1 parent 042d42c commit d8d5197

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utbot-framework/src/main/kotlin/org/utbot/fuzzer/FuzzerFunctions.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ private object ConstantsFromIfStatement: ConstantsFinder {
8383
// 1. compare (result = local compare constant)
8484
// 2. if result
8585
if (unit is JAssignStmt) {
86+
// Accepts only those assignments statements that uses compare operation on the right
87+
if (unit.rightOp !is JCmpExpr) {
88+
return emptyList()
89+
}
8690
useBoxes = unit.rightOp.useBoxes.mapNotNull { (it as? ImmediateBox)?.value }
8791
ifStatement = nextDirectUnit(graph, unit) as? JIfStmt
8892
}

0 commit comments

Comments
 (0)