[FIR2IR] Slightly cleanup FakeOverrideGenerator
This commit is contained in:
committed by
Space Team
parent
ef8f954586
commit
ebeba231a0
+2
-3
@@ -180,7 +180,7 @@ class FakeOverrideGenerator(
|
|||||||
createFakeOverriddenIfNeeded(
|
createFakeOverriddenIfNeeded(
|
||||||
firClass, irClass, isLocal, propertyOrFieldSymbol,
|
firClass, irClass, isLocal, propertyOrFieldSymbol,
|
||||||
{ field, _, _ -> declarationStorage.getCachedIrFieldStaticFakeOverrideSymbolByDeclaration(field) },
|
{ field, _, _ -> declarationStorage.getCachedIrFieldStaticFakeOverrideSymbolByDeclaration(field) },
|
||||||
{ field, irParent, _, -> declarationStorage.getOrCreateIrField(field, irParent) },
|
{ field, irParent, _ -> declarationStorage.getOrCreateIrField(field, irParent) },
|
||||||
createFakeOverrideSymbol = { firField, _ ->
|
createFakeOverrideSymbol = { firField, _ ->
|
||||||
FirFakeOverrideGenerator.createSubstitutionOverrideField(
|
FirFakeOverrideGenerator.createSubstitutionOverrideField(
|
||||||
session, firField,
|
session, firField,
|
||||||
@@ -303,13 +303,12 @@ class FakeOverrideGenerator(
|
|||||||
val scope = klass.unsubstitutedScope()
|
val scope = klass.unsubstitutedScope()
|
||||||
val classLookupTag = klass.symbol.toLookupTag()
|
val classLookupTag = klass.symbol.toLookupTag()
|
||||||
val overriddenFirSymbols = computeBaseSymbols(originalSymbol, directOverridden, scope, classLookupTag)
|
val overriddenFirSymbols = computeBaseSymbols(originalSymbol, directOverridden, scope, classLookupTag)
|
||||||
val superTypes = klass.superConeTypes.toMutableList()
|
|
||||||
val typeContext = session.typeContext
|
val typeContext = session.typeContext
|
||||||
val overriddenPerSupertype = setMultimapOf<ConeClassLikeLookupTag, S>()
|
val overriddenPerSupertype = setMultimapOf<ConeClassLikeLookupTag, S>()
|
||||||
with(typeContext) {
|
with(typeContext) {
|
||||||
for (symbol in overriddenFirSymbols) {
|
for (symbol in overriddenFirSymbols) {
|
||||||
val symbolDispatchReceiver = symbol.containingClassLookupTag() ?: continue
|
val symbolDispatchReceiver = symbol.containingClassLookupTag() ?: continue
|
||||||
for (superType in superTypes) {
|
for (superType in klass.superConeTypes) {
|
||||||
val compatibleType = superType.anySuperTypeConstructor {
|
val compatibleType = superType.anySuperTypeConstructor {
|
||||||
it.typeConstructor() == symbolDispatchReceiver
|
it.typeConstructor() == symbolDispatchReceiver
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user