Add FirScope::getCallableNames function

This commit is contained in:
Roman Golyshev
2020-07-01 14:21:45 +03:00
committed by Ilya Kirillov
parent 1f3add49f4
commit 656086f90a
7 changed files with 43 additions and 0 deletions
@@ -44,4 +44,8 @@ class FirCompositeScope(private val scopes: Iterable<FirScope>) : FirScope() {
override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) {
return processComposite(FirScope::processPropertiesByName, name, processor)
}
override fun getCallableNames(): Set<Name> {
return scopes.flatMapTo(mutableSetOf()) { it.getCallableNames() }
}
}
@@ -34,6 +34,7 @@ abstract class FirScope {
open fun mayContainName(name: Name) = true
open fun getCallableNames(): Set<Name> = emptySet()
}
fun FirTypeScope.processOverriddenFunctionsAndSelf(