Use nullability from approximated local type in AbstractTypeApproximator

This commit is contained in:
Ilya Kirillov
2021-02-19 12:39:56 +01:00
parent 3571074da4
commit af4d300686
@@ -174,6 +174,7 @@ abstract class AbstractTypeApproximator(val ctx: TypeSystemInferenceExtensionCon
stubTypesEqualToAnything = false
)
return AbstractTypeChecker.findCorrespondingSupertypes(typeCheckerContext, type, superConstructor).first()
.withNullability(type.isMarkedNullable())
}
private fun isIntersectionTypeEffectivelyNothing(constructor: IntersectionTypeConstructorMarker): Boolean {