FIR: Refine makesSenseToBeDefinitelyNotNull

Make it work just the same as the analogue from FE 1.0
This change is necessary since many tests start failing after
we began reporting diagnostics after call completion
This commit is contained in:
Denis.Zharkov
2021-04-27 13:16:06 +03:00
committed by teamcityserver
parent a700fdc312
commit 42d387925d
16 changed files with 111 additions and 80 deletions
@@ -128,7 +128,11 @@ private fun coneFlexibleOrSimpleType(
type is ConeTypeParameterType || type.isNullable
}
) {
return ConeDefinitelyNotNullType.create(lowerBound) ?: lowerBound
return ConeDefinitelyNotNullType.create(
lowerBound,
session.typeContext,
useCorrectedNullabilityForFlexibleTypeParameters = true
) ?: lowerBound
}
}
return lowerBound