FIR: Leave only one composite-like scope implementation
This commit is contained in:
+1
-2
@@ -11,8 +11,7 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
abstract class FirIterableScope : FirScope() {
|
||||
protected abstract val scopes: Iterable<FirScope>
|
||||
class FirCompositeScope(private val scopes: Iterable<FirScope>) : FirScope() {
|
||||
|
||||
override fun processClassifiersByNameWithSubstitution(
|
||||
name: Name,
|
||||
@@ -38,10 +38,8 @@ abstract class FirScopeProvider {
|
||||
|
||||
return when {
|
||||
nestedClassifierScope != null && callableScope != null ->
|
||||
FirReadOnlyCompositeScope(listOf(nestedClassifierScope, callableScope))
|
||||
FirCompositeScope(listOf(nestedClassifierScope, callableScope))
|
||||
else -> nestedClassifierScope ?: callableScope
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class FirReadOnlyCompositeScope(override val scopes: Iterable<FirScope>) : FirIterableScope()
|
||||
|
||||
Reference in New Issue
Block a user