IR: Test for toSkip(this) in T.resolveFakeOverride()

^KT-49371 Fixed
This commit is contained in:
Georgy Bronnikov
2021-10-27 00:21:31 +03:00
parent c67a1ee2e5
commit 534beb8553
10 changed files with 68 additions and 1 deletions
@@ -98,7 +98,7 @@ fun <S : IrSymbol, T : IrOverridableDeclaration<S>> T.resolveFakeOverride(
allowAbstract: Boolean = false,
toSkip: (T) -> Boolean = { false }
): T? {
if (!isFakeOverride) return this
if (!isFakeOverride && !toSkip(this)) return this
return if (allowAbstract) {
val reals = collectRealOverrides(toSkip)
if (reals.isEmpty()) error("No real overrides for ${this.render()}")