diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt index 8af81d6f879..2c8ac8770a3 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt @@ -295,8 +295,13 @@ class FirTypeIntersectionScope private constructor( } @Suppress("UNCHECKED_CAST") - private fun > getDirectOverriddenSymbols(symbol: S): Collection = - overriddenSymbols[symbol].orEmpty() as Collection + private fun > getDirectOverriddenSymbols(symbol: S): Collection { + val intersectionOverride = intersectionOverrides[symbol] + val allDirectOverridden = overriddenSymbols[symbol].orEmpty() + intersectionOverride?.let { + overriddenSymbols[it] + }.orEmpty() + return allDirectOverridden as Collection + } override fun processOverriddenFunctionsWithDepth( functionSymbol: FirFunctionSymbol<*>,