Skip to content

Commit 31e1230

Browse files
committed
Kotlin: Remove another not-null-expr
1 parent 20ac15d commit 31e1230

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2893,8 +2893,12 @@ open class KotlinFileExtractor(
28932893
// Check for a desugared in-place update operator, such as "v += e":
28942894
val inPlaceUpdateRhs = getUpdateInPlaceRHS(e.origin, { it is IrGetValue && it.symbol.owner == e.symbol.owner }, rhsValue)
28952895
if (inPlaceUpdateRhs != null) {
2896-
if (!writeUpdateInPlaceExpr(e.origin!!, tw, id, type, exprParent)) {
2897-
logger.errorElement("Unexpected origin", e)
2896+
val origin = e.origin
2897+
if (origin == null) {
2898+
logger.errorElement("No origin for set-value", e)
2899+
return
2900+
} else if (!writeUpdateInPlaceExpr(origin, tw, id, type, exprParent)) {
2901+
logger.errorElement("Unexpected origin for set-value", e)
28982902
return
28992903
}
29002904
} else {

0 commit comments

Comments
 (0)