Fix compiler bootstrap (1.4.0-dev-9205)
This commit is contained in:
+4
-7
@@ -177,14 +177,11 @@ class IfNullExpressionsFusionLowering(val context: CommonBackendContext) : FileL
|
|||||||
return IfNullExpr(whenExpr.type, subjectVar, branch0.result, elseResult)
|
return IfNullExpr(whenExpr.type, subjectVar, branch0.result, elseResult)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun IrBranch.getElseBranchResultOrNull() =
|
private fun IrBranch.getElseBranchResultOrNull(): IrExpression? {
|
||||||
when {
|
val branchCondition = condition
|
||||||
this is IrElseBranch ->
|
return if (branchCondition is IrConst<*> && branchCondition.value == true)
|
||||||
result
|
result
|
||||||
// deserialization generates a simple branch with const 'true' condition
|
else
|
||||||
condition is IrConst<*> && condition.value == true ->
|
|
||||||
result
|
|
||||||
else ->
|
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user