[SLC] Treat error class types as not-nullable

This commit is contained in:
Pavel Mikhailovskii
2023-05-11 11:48:45 +00:00
committed by Space Team
parent bdad2e5c88
commit 25c0725da9
9 changed files with 31 additions and 21 deletions
@@ -126,6 +126,7 @@ internal fun KtLightElement<*, *>.isOriginEquivalentTo(that: PsiElement?): Boole
}
internal fun KtAnalysisSession.getTypeNullability(ktType: KtType): NullabilityType {
if (ktType is KtClassErrorType) return NullabilityType.NotNull
if (ktType.nullabilityType != NullabilityType.NotNull) return ktType.nullabilityType
if (ktType.isUnit) return NullabilityType.NotNull