FIR: Refine delegated members introduced to use-site scope

- Do not add hashCode/equals/toString
- Do not add privates and ones that are already declared
This commit is contained in:
Denis Zharkov
2020-10-27 10:50:07 +03:00
parent 2105a041a5
commit 2589de6c49
15 changed files with 212 additions and 410 deletions
@@ -35,6 +35,14 @@ abstract class FirScope {
open fun mayContainName(name: Name) = true
}
fun FirScope.getFunctions(name: Name): List<FirFunctionSymbol<*>> = mutableListOf<FirFunctionSymbol<*>>().apply {
processFunctionsByName(name, this::add)
}
fun FirScope.getProperties(name: Name): List<FirVariableSymbol<*>> = mutableListOf<FirVariableSymbol<*>>().apply {
processPropertiesByName(name, this::add)
}
fun FirTypeScope.processOverriddenFunctionsAndSelf(
functionSymbol: FirFunctionSymbol<*>,
processor: (FirFunctionSymbol<*>) -> ProcessorAction