FIR: Implement lookup tracking
This commit is contained in:
@@ -52,4 +52,8 @@ class FirCompositeScope(val scopes: Iterable<FirScope>) : FirScope(), FirContain
|
||||
override fun getClassifierNames(): Set<Name> {
|
||||
return scopes.flatMapTo(hashSetOf()) { it.getContainingClassifierNamesIfPresent() }
|
||||
}
|
||||
|
||||
override val scopeOwnerLookupNames: List<String> by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
||||
scopes.flatMap { it.scopeOwnerLookupNames }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ abstract class FirScope {
|
||||
}
|
||||
|
||||
open fun mayContainName(name: Name) = true
|
||||
|
||||
open val scopeOwnerLookupNames: List<String> get() = emptyList()
|
||||
}
|
||||
|
||||
fun FirScope.getSingleClassifier(name: Name): FirClassifierSymbol<*>? = mutableListOf<FirClassifierSymbol<*>>().apply {
|
||||
|
||||
Reference in New Issue
Block a user