diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirScopeProvider.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirScopeProvider.kt index a523c8fa6ff..f438497a37a 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirScopeProvider.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirScopeProvider.kt @@ -132,9 +132,9 @@ internal class KtFirScopeProvider( @OptIn(ExperimentalStdlibApi::class) val allKtScopes = buildList { - implicitReceiverScopes.mapNotNullTo(this, ::convertToKtScope) - nonLocalScopes.mapNotNullTo(this, ::convertToKtScope) - firLocalScopes.mapNotNullTo(this, ::convertToKtScope) + implicitReceiverScopes.mapTo(this, ::convertToKtScope) + nonLocalScopes.mapTo(this, ::convertToKtScope) + firLocalScopes.mapTo(this, ::convertToKtScope) } KtScopeContext(getCompositeScope(allKtScopes), implicitReceiversTypes) @@ -145,14 +145,14 @@ internal class KtFirScopeProvider( ?.getNonStrictParentOfType() ?.takeIf { it.textOffset == offset } - private fun convertToKtScope(firScope: FirScope): KtScope? { + private fun convertToKtScope(firScope: FirScope): KtScope { firScopeStorage.register(firScope) return when (firScope) { is FirAbstractSimpleImportingScope -> KtFirNonStarImportingScope(firScope, builder, token) is FirAbstractStarImportingScope -> KtFirStarImportingScope(firScope, builder, project, token) is FirPackageMemberScope -> KtFirPackageScope(firScope, project, builder, token) is FirContainingNamesAwareScope -> KtFirDelegatingScopeImpl(firScope, builder, token) - is FirMemberTypeParameterScope -> null + is FirMemberTypeParameterScope -> KtFirDelegatingScopeImpl(firScope, builder, token) else -> TODO(firScope::class.toString()) } }