[FIR] Cleanup signature of getNestedClassifierScope
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ abstract class FirAbstractTreeTransformerWithSuperTypes(
|
|||||||
useSiteSession = session
|
useSiteSession = session
|
||||||
).asReversed()
|
).asReversed()
|
||||||
for (superType in superTypes) {
|
for (superType in superTypes) {
|
||||||
session.getNestedClassifierScope(superType.lookupTag, scopeSession)?.let { nestedClassifierScope ->
|
superType.lookupTag.getNestedClassifierScope(session, scopeSession)?.let { nestedClassifierScope ->
|
||||||
val scope = nestedClassifierScope.wrapNestedClassifierScopeWithSubstitutionForSuperType(superType, session)
|
val scope = nestedClassifierScope.wrapNestedClassifierScopeWithSubstitutionForSuperType(superType, session)
|
||||||
scopes.add(scope)
|
scopes.add(scope)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -150,7 +150,7 @@ private fun createScopesForNestedClasses(
|
|||||||
lookupInterfaces = false, deep = true, substituteTypes = true, useSiteSession = session,
|
lookupInterfaces = false, deep = true, substituteTypes = true, useSiteSession = session,
|
||||||
supertypeSupplier = supertypeComputationSession.supertypesSupplier
|
supertypeSupplier = supertypeComputationSession.supertypesSupplier
|
||||||
).asReversed().mapNotNullTo(this) {
|
).asReversed().mapNotNullTo(this) {
|
||||||
session.getNestedClassifierScope(it.lookupTag, scopeSession)
|
it.lookupTag.getNestedClassifierScope(session, scopeSession)
|
||||||
?.wrapNestedClassifierScopeWithSubstitutionForSuperType(it, session)
|
?.wrapNestedClassifierScopeWithSubstitutionForSuperType(it, session)
|
||||||
}
|
}
|
||||||
addIfNotNull(klass.typeParametersScope())
|
addIfNotNull(klass.typeParametersScope())
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ private fun doCreateImportingScopes(
|
|||||||
|
|
||||||
private val PACKAGE_MEMBER = scopeSessionKey<FqName, FirPackageMemberScope>()
|
private val PACKAGE_MEMBER = scopeSessionKey<FqName, FirPackageMemberScope>()
|
||||||
|
|
||||||
fun FirSession.getNestedClassifierScope(lookupTag: ConeClassLikeLookupTag, scopeSession: ScopeSession): FirScope? {
|
fun ConeClassLikeLookupTag.getNestedClassifierScope(session: FirSession, scopeSession: ScopeSession): FirScope? {
|
||||||
val klass = when (lookupTag) {
|
val klass = when (this) {
|
||||||
is ConeClassLookupTagWithFixedSymbol -> lookupTag.symbol.fir
|
is ConeClassLookupTagWithFixedSymbol -> symbol.fir
|
||||||
else -> firSymbolProvider.getClassLikeSymbolByFqName(lookupTag.classId)?.fir as? FirRegularClass ?: return null
|
else -> session.firSymbolProvider.getClassLikeSymbolByFqName(classId)?.fir as? FirRegularClass ?: return null
|
||||||
}
|
}
|
||||||
return klass.scopeProvider.getNestedClassifierScope(klass, this, scopeSession)
|
return klass.scopeProvider.getNestedClassifierScope(klass, session, scopeSession)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user