[FIR] Generate signatures for synthesized class delegation fields

This is to align the behavior with K1.

^KT-57754 Fixed

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
This commit is contained in:
Sergej Jaskiewicz
2023-06-15 20:46:08 +02:00
committed by Space Team
parent 1ac3355a41
commit addb048ce9
10 changed files with 1 additions and 26 deletions
@@ -95,7 +95,6 @@ class FirBasedSignatureComposer(override val mangler: FirMangler) : Fir2IrSignat
if (declaration is FirRegularClass && declaration.classId.isLocal) return null if (declaration is FirRegularClass && declaration.classId.isLocal) return null
if (declaration is FirCallableDeclaration) { if (declaration is FirCallableDeclaration) {
if (declaration.visibility == Visibilities.Local) return null if (declaration.visibility == Visibilities.Local) return null
if (declaration is FirField && declaration.source?.kind == KtFakeSourceElementKind.ClassDelegationField) return null
if (declaration.dispatchReceiverClassLookupTagOrNull()?.classId?.isLocal == true || containingClass?.classId?.isLocal == true) return null if (declaration.dispatchReceiverClassLookupTagOrNull()?.classId?.isLocal == true || containingClass?.classId?.isLocal == true) return null
} }
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
interface IBase { interface IBase {
fun foo(x: Int, s: String) fun foo(x: Int, s: String)
fun bar(): Int fun bar(): Int
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
interface IFooBar { interface IFooBar {
fun foo() fun foo()
fun bar() fun bar()
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
interface IFoo { interface IFoo {
@Deprecated("") @Deprecated("")
val prop: String get() = "" val prop: String get() = ""
-3
View File
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
interface I { interface I {
val <T> T.id: T val <T> T.id: T
get() = this get() = this
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
interface IBase<T> { interface IBase<T> {
fun foo(x: Int) fun foo(x: Int)
val bar: Int val bar: Int
@@ -1,8 +1,5 @@
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
// FILE: Foo.java // FILE: Foo.java
import java.util.Set; import java.util.Set;
@@ -5,7 +5,7 @@
// KT-50774 // KT-50774
// MUTE_SIGNATURE_COMPARISON_K2: ANY // MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57427, KT-57754 // ^ KT-57427
class Wrapper(var baseUrl: String) class Wrapper(var baseUrl: String)
-3
View File
@@ -1,8 +1,5 @@
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
// FILE: javaWildcardType.kt // FILE: javaWildcardType.kt
interface K { interface K {
fun kf1(): Collection<out CharSequence> fun kf1(): Collection<out CharSequence>
@@ -1,8 +1,5 @@
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57754
// MODULE: lib // MODULE: lib
// FILE: A.java // FILE: A.java
public class A { public class A {