[FIR] Fix all illegal usages of declarationSiteSession in compiler

There are still some usages in IDE which should be investigated
This commit is contained in:
Dmitriy Novozhilov
2021-04-21 13:26:40 +03:00
committed by TeamCityServer
parent f98f41bbc3
commit 234ab3b35d
53 changed files with 191 additions and 204 deletions
@@ -91,7 +91,7 @@ internal class KtFirScopeProvider(
override fun getDeclaredMemberScope(classSymbol: KtSymbolWithMembers): KtDeclaredMemberScope = withValidityAssertion {
declaredMemberScopeCache.getOrPut(classSymbol) {
val firScope = classSymbol.withFirForScope {
declaredMemberScope(it)
analysisSession.rootModuleSession.declaredMemberScope(it)
} ?: return@getOrPut KtFirEmptyMemberScope(classSymbol)
firScopeStorage.register(firScope)