FIR: Avoid adding new constraints when system already has contradictions
This commit is contained in:
committed by
teamcityserver
parent
571c16be52
commit
2b806e717d
+1
-1
@@ -182,7 +182,7 @@ class PostponedArgumentsAnalyzer(
|
|||||||
val lastExpressionCoercedToUnit =
|
val lastExpressionCoercedToUnit =
|
||||||
it == lastExpression && expectedReturnType?.isUnitOrFlexibleUnit == true && !it.typeRef.coneType.isUnitOrFlexibleUnit
|
it == lastExpression && expectedReturnType?.isUnitOrFlexibleUnit == true && !it.typeRef.coneType.isUnitOrFlexibleUnit
|
||||||
// No constraint for the last expression of lambda if it will be coerced to Unit.
|
// No constraint for the last expression of lambda if it will be coerced to Unit.
|
||||||
if (!lastExpressionCoercedToUnit) {
|
if (!lastExpressionCoercedToUnit && !c.getBuilder().hasContradiction) {
|
||||||
candidate.resolveArgumentExpression(
|
candidate.resolveArgumentExpression(
|
||||||
c.getBuilder(),
|
c.getBuilder(),
|
||||||
it,
|
it,
|
||||||
|
|||||||
Reference in New Issue
Block a user