[FE] Use errorTypesEqualToAnything and stubTypesEqualToAnything for type checker context which is used for type intersection emptiness check

This commit is contained in:
Victor Petukhov
2022-05-11 20:59:40 +02:00
committed by teamcity
parent 7ac001b7bd
commit ba158de848
@@ -347,7 +347,11 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui
private fun areIncompatibleSuperTypes(firstType: KotlinTypeMarker, secondType: KotlinTypeMarker): Boolean =
firstType.typeConstructor() == secondType.typeConstructor()
&& !AbstractTypeChecker.equalTypes(context = this, firstType, secondType)
&& !AbstractTypeChecker.equalTypes(
newTypeCheckerState(errorTypesEqualToAnything = true, stubTypesEqualToAnything = true),
firstType,
secondType
)
// interface A<T>
// interface B : A<Int>