FIR2IR: add fake override generation for built-in classes
This commit is contained in:
committed by
teamcity
parent
0622a47493
commit
d4cdf874be
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.fir.types.isSuspendFunctionType
|
||||
import org.jetbrains.kotlin.fir.resolve.isKFunctionInvoke
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.firProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope
|
||||
import org.jetbrains.kotlin.fir.symbols.*
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
@@ -163,6 +164,14 @@ class Fir2IrDeclarationStorage(
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
val scope = firClass.unsubstitutedScope(session, scopeSession, withForcedTypeCalculator = false)
|
||||
scope.getCallableNames().forEach { callableName ->
|
||||
buildList {
|
||||
fakeOverrideGenerator.generateFakeOverridesForName(
|
||||
irClass, scope, callableName, firClass, this, realDeclarationSymbols = emptySet()
|
||||
)
|
||||
}.also(fakeOverrideGenerator::bindOverriddenSymbols)
|
||||
}
|
||||
}
|
||||
|
||||
fun registerFile(firFile: FirFile, irFile: IrFile) {
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ class FakeOverrideGenerator(
|
||||
)
|
||||
}
|
||||
|
||||
private fun generateFakeOverridesForName(
|
||||
internal fun generateFakeOverridesForName(
|
||||
irClass: IrClass,
|
||||
useSiteMemberScope: FirTypeScope,
|
||||
name: Name,
|
||||
|
||||
Reference in New Issue
Block a user