[FIR] Make session part of the key of declared scope cache
In the following commits, there will be a need to retrieve the scope of the same class from different sessions, so we need to consider the session as part of the key along with class symbol
This commit is contained in:
committed by
Nikolay Lunyak
parent
77547c0312
commit
ff063f553e
@@ -175,7 +175,7 @@ inline fun <reified ID : Any, reified FS : FirScope> scopeSessionKey(): ScopeSes
|
||||
return object : ScopeSessionKey<ID, FS>() {}
|
||||
}
|
||||
|
||||
val USE_SITE = scopeSessionKey<FirClassSymbol<*>, FirTypeScope>()
|
||||
val USE_SITE = scopeSessionKey<Pair<FirSession, FirClassSymbol<*>>, FirTypeScope>()
|
||||
|
||||
/* TODO REMOVE */
|
||||
fun createSubstitutionForScope(
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class FirKotlinScopeProvider(
|
||||
klass.lazyResolveToPhaseWithCallableMembers(it)
|
||||
}
|
||||
|
||||
return scopeSession.getOrBuild(klass.symbol, USE_SITE) {
|
||||
return scopeSession.getOrBuild(useSiteSession to klass.symbol, USE_SITE) {
|
||||
val declaredScope = useSiteSession.declaredMemberScope(klass, memberRequiredPhase)
|
||||
val possiblyDelegatedDeclaredMemberScope = declaredMemberScopeDecorator(
|
||||
klass,
|
||||
|
||||
Reference in New Issue
Block a user