EmptyIntersectionTypeChecker: don't take stub & error types into account
This commit fixes some tests broken by previous refactorings
This commit is contained in:
committed by
Space Team
parent
a7840d10d4
commit
26ff806440
+4
@@ -109,6 +109,10 @@ internal object EmptyIntersectionTypeChecker {
|
|||||||
).isNotEmpty()
|
).isNotEmpty()
|
||||||
|
|
||||||
private fun TypeSystemInferenceExtensionContext.mayCauseEmptyIntersection(type: KotlinTypeMarker): Boolean {
|
private fun TypeSystemInferenceExtensionContext.mayCauseEmptyIntersection(type: KotlinTypeMarker): Boolean {
|
||||||
|
if (type.lowerBoundIfFlexible().isStubType() || type.isError()) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
val typeConstructor = type.typeConstructor()
|
val typeConstructor = type.typeConstructor()
|
||||||
|
|
||||||
if (!typeConstructor.isClassTypeConstructor() && !typeConstructor.isTypeParameterTypeConstructor())
|
if (!typeConstructor.isClassTypeConstructor() && !typeConstructor.isTypeParameterTypeConstructor())
|
||||||
|
|||||||
Reference in New Issue
Block a user