FirTypeIntersectionScope: don't create in no-supertypes situation

This commit is contained in:
Mikhail Glukhikh
2020-11-11 13:03:20 +03:00
parent 8ace0d9ad1
commit 5b947144d4
@@ -493,6 +493,9 @@ class FirTypeIntersectionScope private constructor(
dispatchReceiverType: ConeKotlinType,
): FirTypeScope {
scopes.singleOrNull()?.let { return it }
if (scopes.isEmpty()) {
return Empty
}
return FirTypeIntersectionScope(session, overrideChecker, scopes, dispatchReceiverType)
}
}