[FIR] Don't generate Any.{toString, equals, hashCode} for expect value classes in metadata
^KT-64121 Fixed Review: https://jetbrains.team/p/kt/reviews/13495/timeline If we generate these declarations then the compiler sees Any.{toString, equals, hashCode} non-synthetic declarations of common metadata and reports false positive ACTUAL_MISSING during intermediate (HMPP) metadata compilation. See the review for more details
This commit is contained in:
+2
-1
@@ -418,7 +418,8 @@ class FirElementSerializer private constructor(
|
||||
val isFakeOverrideOfAnyFunctionInDataOrValueClass = this@collectDeclarations is FirRegularClass &&
|
||||
(this@collectDeclarations.isData || this@collectDeclarations.isInline) &&
|
||||
dispatchReceiverLookupTag?.classId == StandardClassIds.Any && !declaration.isFinal
|
||||
if (isFakeOverrideOfAnyFunctionInDataOrValueClass ||
|
||||
// Related: https://youtrack.jetbrains.com/issue/KT-20427#focus=Comments-27-8652759.0-0
|
||||
if (isFakeOverrideOfAnyFunctionInDataOrValueClass && !this@collectDeclarations.isExpect ||
|
||||
!declaration.isSubstitutionOrIntersectionOverride &&
|
||||
(declaration.isStatic || declaration is FirConstructor || dispatchReceiverLookupTag == this@collectDeclarations.symbol.toLookupTag())
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user