[FE 1.0] Use the new type intersection emptiness check

Also introduced compatibility mode to preserve compatibility for is/as/equality checks

^KT-29316 Related
This commit is contained in:
Victor Petukhov
2022-06-09 09:59:55 +02:00
committed by teamcity
parent bc1c2adae1
commit 8227c4b603
15 changed files with 90 additions and 24 deletions
@@ -426,6 +426,8 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
return withAttributes(attributes.remove(CompilerConeAttributes.Exact))
}
override fun KotlinTypeMarker.canHaveSubtypes(typeChecker: AbstractTypeChecker): Boolean? = null
override fun TypeConstructorMarker.toErrorType(): SimpleTypeMarker {
if (this is ErrorTypeConstructor) return createErrorType(reason)
if (this is ConeClassLikeLookupTag) return createErrorType("Not found classifier: $classId")