JVM IR: Resolve fake overrides during inline class mangling
This is necessary to determine which mangling scheme to use (KT-51672).
This commit is contained in:
+5
-6
@@ -234,12 +234,11 @@ class MemoizedInlineClassReplacements(
|
||||
val replacement = buildReplacementInner(function, replacementOrigin, noFakeOverride, useOldManglingScheme, body)
|
||||
// When using the new mangling scheme we might run into dependencies using the old scheme
|
||||
// for which we will fall back to the old mangling scheme as well.
|
||||
if (
|
||||
!useOldManglingScheme &&
|
||||
replacement.name.asString().contains("-") &&
|
||||
function.parentClassId?.let { classFileContainsMethod(it, replacement, context) } == false
|
||||
) {
|
||||
return buildReplacementInner(function, replacementOrigin, noFakeOverride, true, body)
|
||||
if (!useOldManglingScheme && replacement.name.asString().contains('-') && function.parentClassId != null) {
|
||||
val resolved = (function as? IrSimpleFunction)?.resolveFakeOverride(true)
|
||||
if (resolved?.parentClassId?.let { classFileContainsMethod(it, replacement, context) } == false) {
|
||||
return buildReplacementInner(function, replacementOrigin, noFakeOverride, true, body)
|
||||
}
|
||||
}
|
||||
return replacement
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user