IR: never attach return type to signatures of fake overrides

Cases that necessitate the return type hack (see KT-46042) always
involve exactly two methods, exactly one of which is a fake override. It
is sufficient to mark one of them.
This commit is contained in:
Georgy Bronnikov
2021-11-17 21:32:23 +03:00
committed by TeamCityServer
parent d2738c02cc
commit d2418a1329
2 changed files with 13 additions and 8 deletions
@@ -103,7 +103,8 @@ class PublicIdSignatureComputer(val mangler: KotlinMangler.IrMangler) : IdSignat
}
private val IrDeclarationWithVisibility.isTopLevelPrivate: Boolean
get() = visibility == DescriptorVisibilities.PRIVATE && !checkIfPlatformSpecificExport() && parent is IrPackageFragment
get() = visibility == DescriptorVisibilities.PRIVATE && !checkIfPlatformSpecificExport() &&
(parent is IrPackageFragment || parent.isFacadeClass)
override fun visitClass(declaration: IrClass) {
collectParents(declaration)