FirTypeIntersectionScope: introduce "intersection" fake overrides

This commit is contained in:
Mikhail Glukhikh
2020-07-14 10:43:10 +03:00
parent 5a422b5ef6
commit 7a2ea49399
6 changed files with 59 additions and 43 deletions
@@ -49,7 +49,7 @@ abstract class FirTypeScope : FirScope() {
directOverriddenMap[functionSymbol] ?: return baseScope.processOverriddenFunctionsWithDepth(functionSymbol, processor)
for (overridden in directOverridden) {
val overriddenDepth = if (overridden is FirNamedFunctionSymbol && overridden.isFakeOverride) 0 else 1
val overriddenDepth = if (overridden is FirNamedFunctionSymbol && overridden.overriddenSymbol != null) 0 else 1
if (!processor(overridden, overriddenDepth)) return ProcessorAction.STOP
if (!baseScope.processOverriddenFunctionsWithDepth(overridden) { symbol, depth ->
processor(symbol, depth + overriddenDepth)