diff --git a/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt b/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt index f9905f48d8c..c21c8a7946c 100644 --- a/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt +++ b/compiler/fir/fir2ir/jvm-backend/src/org/jetbrains/kotlin/fir/backend/jvm/FirJvmMangleComputer.kt @@ -33,28 +33,6 @@ class FirJvmMangleComputer( override fun copy(newMode: MangleMode): FirJvmMangleComputer = FirJvmMangleComputer(builder, newMode) - // FIXME this implementation causes the mangler to deliver different result than IR mangler. Consider using base method instead - override fun getEffectiveParent(typeParameter: ConeTypeParameterLookupTag): FirMemberDeclaration = typeParameter.symbol.fir.run { - - fun FirTypeParameter.sameAs(other: FirTypeParameter) = - this === other || - (name == other.name && bounds.size == other.bounds.size && - bounds.zip(other.bounds).all { it.first.coneType == it.second.coneType }) - - for (parent in typeParameterContainers) { - if (parent.typeParameters.any { this.sameAs(it.symbol.fir) }) { - return parent - } - if (parent is FirCallableDeclaration) { - val overriddenFir = parent.originalForSubstitutionOverride - if (overriddenFir is FirTypeParametersOwner && overriddenFir.typeParameters.any { this.sameAs(it) }) { - return parent - } - } - } - throw IllegalStateException("Should not be here!") - } - private inner class JvmVisitor : Visitor() { override fun visitField(field: FirField) { if (field is FirJavaField) { diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/FirMangleComputer.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/FirMangleComputer.kt index 08e7f6a800d..643cc6000bf 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/FirMangleComputer.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/FirMangleComputer.kt @@ -12,7 +12,6 @@ import org.jetbrains.kotlin.backend.common.serialization.mangle.collectForMangle import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticPropertyAccessor -import org.jetbrains.kotlin.fir.declarations.utils.isExpect import org.jetbrains.kotlin.fir.declarations.utils.isStatic import org.jetbrains.kotlin.fir.resolve.fullyExpandedType import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider @@ -108,8 +107,17 @@ open class FirMangleComputer( override fun isUnit(type: ConeKotlinType) = type.isUnit @OptIn(SymbolInternals::class) - override fun getEffectiveParent(typeParameter: ConeTypeParameterLookupTag): FirMemberDeclaration = typeParameter.symbol.fir.run { - this.containingDeclarationSymbol.fir as FirMemberDeclaration + override fun getEffectiveParent(typeParameter: ConeTypeParameterLookupTag): FirMemberDeclaration = + typeParameter.symbol.containingDeclarationSymbol.fir as FirMemberDeclaration + + override fun getContainerIndex(parent: FirMemberDeclaration): Int { + // If a type parameter is declared in a java method, typeParameterContainers will contain the enhanced declaration, + // but parent will be the non-enhanced version. + // To work around this, we additionally compare declarations using their callable IDs. + val callableId = (parent as? FirCallableDeclaration)?.symbol?.callableId + return typeParameterContainers.indexOfFirst { + it == parent || it is FirCallableDeclaration && it.symbol.callableId == callableId + } } override fun renderDeclaration(declaration: FirDeclaration) = declaration.render() @@ -279,4 +287,4 @@ open class FirMangleComputer( } } } -} \ No newline at end of file +} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/BaseKotlinMangleComputer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/BaseKotlinMangleComputer.kt index d38a53ca832..9e053d5d5b5 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/BaseKotlinMangleComputer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/mangle/BaseKotlinMangleComputer.kt @@ -219,7 +219,7 @@ abstract class BaseKotlinMangleComputer= 0) { "No container found for type parameter '${getTypeParameterName(typeParameter)}' of '${renderDeclaration(parent)}'" } @@ -228,6 +228,9 @@ abstract class BaseKotlinMangleComputer, val charArray: CharArray, diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt index 0d47797dcac..4c2586305de 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - data class Test1(val x: T) data class Test2(val x: T) diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt index cf4c3dc144a..c5be7be7977 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - open class Cell(val value: T) typealias CT = Cell diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt index ab8dd9e7fa8..2df1de559e0 100644 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt +++ b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt @@ -1,8 +1,5 @@ // !LANGUAGE: +InlineClasses -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class C(val t: T) { override fun hashCode(): Int = t as Int } diff --git a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt index 7aa6eeaf007..8b348ec95be 100644 --- a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt +++ b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt @@ -1,5 +1,5 @@ -// SKIP_SIGNATURE_DUMP -// ^ KT-57429, different types in annotations generated by K1 and K2 +// MUTE_SIGNATURE_COMPARISON_K2: ANY +// ^ KT-54517 package ann diff --git a/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.sig.kt.txt b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.sig.kt.txt new file mode 100644 index 00000000000..1a12437c9a9 --- /dev/null +++ b/compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.sig.kt.txt @@ -0,0 +1,162 @@ +package ann + +// CHECK: +// Mangled name: ann.Test1 +// Public signature: ann/Test1|null[0] +open annotation class Test1 : Annotation { + // CHECK: + // Mangled name: ann.Test1{}x + // Public signature: ann/Test1.x|-8060530855978347579[0] + val x: Int + // CHECK JVM_IR: + // Mangled name: ann.Test1#(){}kotlin.Int + // Public signature: ann/Test1.x.|4966956098150895696[0] + // CHECK JS_IR: + // Mangled name: ann.Test1#(){} + // Public signature: ann/Test1.x.|1482705010654679335[0] + get + + // CHECK: + // Mangled name: ann.Test1#(kotlin.Int){} + // Public signature: ann/Test1.|-5182794243525578284[0] + constructor(x: Int) /* primary */ + +} + +// CHECK: +// Mangled name: ann.Test2 +// Public signature: ann/Test2|null[0] +open annotation class Test2 : Annotation { + // CHECK: + // Mangled name: ann.Test2{}x + // Public signature: ann/Test2.x|-8060530855978347579[0] + val x: Int + // CHECK JVM_IR: + // Mangled name: ann.Test2#(){}kotlin.Int + // Public signature: ann/Test2.x.|4966956098150895696[0] + // CHECK JS_IR: + // Mangled name: ann.Test2#(){} + // Public signature: ann/Test2.x.|1482705010654679335[0] + get + + // CHECK: + // Mangled name: ann.Test2#(kotlin.Int){} + // Public signature: ann/Test2.|-5182794243525578284[0] + constructor(x: Int) /* primary */ + +} + +// CHECK: +// Mangled name: ann.Test3 +// Public signature: ann/Test3|null[0] +open annotation class Test3> : Annotation { + // CHECK: + // Mangled name: ann.Test3{}x + // Public signature: ann/Test3.x|-8060530855978347579[0] + val x: Test1> + // CHECK JVM_IR: + // Mangled name: ann.Test3#(){}ann.Test1> + // Public signature: ann/Test3.x.|-476605448158023096[0] + // CHECK JS_IR: + // Mangled name: ann.Test3#(){} + // Public signature: ann/Test3.x.|1482705010654679335[0] + get + + // CHECK: + // Mangled name: ann.Test3#(ann.Test1>){} + // Public signature: ann/Test3.|-7213108781936914004[0] + constructor(x: Test1>) /* primary */ + +} + +// CHECK: +// Mangled name: ann.Test4 +// Public signature: ann/Test4|null[0] +open annotation class Test4 : Annotation { + // CHECK: + // Mangled name: ann.Test4{}x + // Public signature: ann/Test4.x|-8060530855978347579[0] + val x: Array>> + // CHECK JVM_IR: + // Mangled name: ann.Test4#(){}kotlin.Array>> + // Public signature: ann/Test4.x.|-4754126975303916738[0] + // CHECK JS_IR: + // Mangled name: ann.Test4#(){} + // Public signature: ann/Test4.x.|1482705010654679335[0] + get + + // CHECK: + // Mangled name: ann.Test4#(kotlin.Array>>){} + // Public signature: ann/Test4.|8552260922942750189[0] + constructor(x: Array>>) /* primary */ + +} + +// CHECK: +// Mangled name: ann.Test5 +// Public signature: ann/Test5|null[0] +open annotation class Test5 : Annotation { + // CHECK: + // Mangled name: ann.Test5{}xs + // Public signature: ann/Test5.xs|1063330853857063704[0] + val xs: Array>> + // CHECK JVM_IR: + // Mangled name: ann.Test5#(){}kotlin.Array>> + // Public signature: ann/Test5.xs.|-4480240150602494549[0] + // CHECK JS_IR: + // Mangled name: ann.Test5#(){} + // Public signature: ann/Test5.xs.|-6958094100501701183[0] + get + + // CHECK: + // Mangled name: ann.Test5#(kotlin.Array>>...){} + // Public signature: ann/Test5.|4580033169902184740[0] + constructor(vararg xs: Test3>) /* primary */ + +} + +// CHECK: +// Mangled name: ann.ARG +// Public signature: ann/ARG|null[0] +class ARG { + // CHECK: + // Mangled name: ann.ARG#(){} + // Public signature: ann/ARG.|-5645683436151566731[0] + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: ann.C +// Public signature: ann/C|null[0] +class C : I { + // CHECK: + // Mangled name: ann.C#(){} + // Public signature: ann/C.|-5645683436151566731[0] + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: ann.CC +// Public signature: ann/CC|null[0] +@Test1(x = 42) +@Test2(x = 38) +@Test3>(x = Test1>>(x = 39)) +@Test4(x = [Test3>(x = Test1>>(x = 40)), Test3>(x = Test1>>(x = 50)), Test3>(x = Test1>>(x = 60))]) +@Test5(xs = [[Test3>(x = Test1>>(x = 70))], [Test3>(x = Test1>>(x = 80))]]) +class CC { + // CHECK: + // Mangled name: ann.CC#(){} + // Public signature: ann/CC.|-5645683436151566731[0] + constructor() /* primary */ + +} + +// CHECK: +// Mangled name: ann.I +// Public signature: ann/I|null[0] +interface I { + +} + diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt index dec4d37d3cd..d84093da80a 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt @@ -1,9 +1,6 @@ // !LANGUAGE: +ContextReceivers // IGNORE_BACKEND: JS_IR -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - data class Pair(val first: A, val second: B) context(Comparator) diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.kt b/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.kt index 13d545303fb..be6258306b5 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/genericOuterClass.kt @@ -1,9 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - context(T) class A context(Collection

) class B

diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/thisWithCustomLabel.kt b/compiler/testData/ir/irText/declarations/contextReceivers/thisWithCustomLabel.kt index 2ffb81f60a2..041c2ecaef1 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/thisWithCustomLabel.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/thisWithCustomLabel.kt @@ -1,9 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +ContextReceivers -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class A(val a: T) class B(val b: Any) class C(val c: Any) diff --git a/compiler/testData/ir/irText/declarations/parameters/constructor.kt b/compiler/testData/ir/irText/declarations/parameters/constructor.kt index d6c8922c239..25091a407fc 100644 --- a/compiler/testData/ir/irText/declarations/parameters/constructor.kt +++ b/compiler/testData/ir/irText/declarations/parameters/constructor.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class Test1(val x: T1, val y: T2) class Test2(x: Int, val y: String) { diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt index eab59030559..d3a67690a9a 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt @@ -1,4 +1 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - data class Test(val x: T, val y: String = "") diff --git a/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt b/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt index a58e6979c1b..75e70c54b96 100644 --- a/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt +++ b/compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt @@ -1,8 +1,5 @@ // FIR_IDENTICAL -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - val test1 = 42 var test2 = 42 diff --git a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt index e07aeabe5a7..bd40076f76c 100644 --- a/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt +++ b/compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt @@ -1,5 +1,5 @@ // MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57754, KT-57429 +// ^ KT-57754 interface IBase { fun foo(x: Int) diff --git a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt index b5541f7726b..b500b1d4bfd 100644 --- a/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt +++ b/compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt @@ -1,8 +1,5 @@ // FIR_IDENTICAL -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class Outer { inner class Inner { fun foo(x1: T1, x2: T2) {} diff --git a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt index eebf901bfd7..b6b3053b727 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt +++ b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt @@ -1,8 +1,5 @@ // FIR_IDENTICAL -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - package test class Foo { diff --git a/compiler/testData/ir/irText/expressions/callableReferences/genericLocalClassConstructorReference.kt b/compiler/testData/ir/irText/expressions/callableReferences/genericLocalClassConstructorReference.kt index 089f274b9c3..24ee949b198 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/genericLocalClassConstructorReference.kt +++ b/compiler/testData/ir/irText/expressions/callableReferences/genericLocalClassConstructorReference.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - open class L(val ll: LL) class Rec(val rt: T) diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt index b3b9512e5db..2b5c5a0c237 100644 --- a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - fun testSimple() = Box(2L * 3) inline fun testArray(n: Int, crossinline block: () -> T): Array { diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.kt b/compiler/testData/ir/irText/expressions/genericPropertyRef.kt index 6bafedb011f..8914b725a8e 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.kt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class Value(var value: T = null as T, var text: String? = null) val Value.additionalText by DVal(Value::text) diff --git a/compiler/testData/ir/irText/expressions/kt36956.kt b/compiler/testData/ir/irText/expressions/kt36956.kt index a09bb7b20eb..221638961f6 100644 --- a/compiler/testData/ir/irText/expressions/kt36956.kt +++ b/compiler/testData/ir/irText/expressions/kt36956.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class A(private val value: T) { operator fun get(i: Int) = value operator fun set(i: Int, v: T) {} diff --git a/compiler/testData/ir/irText/expressions/kt44993.kt b/compiler/testData/ir/irText/expressions/kt44993.kt index fdc22da5958..aaed2cc6d26 100644 --- a/compiler/testData/ir/irText/expressions/kt44993.kt +++ b/compiler/testData/ir/irText/expressions/kt44993.kt @@ -3,9 +3,6 @@ // WITH_STDLIB // SKIP_KT_DUMP -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - // FILE: kt44993.kt fun f(r: KotlinBox): String = r?.data?.element!! diff --git a/compiler/testData/ir/irText/expressions/kt47328.kt b/compiler/testData/ir/irText/expressions/kt47328.kt index d37d85cbc44..34044a8242e 100644 --- a/compiler/testData/ir/irText/expressions/kt47328.kt +++ b/compiler/testData/ir/irText/expressions/kt47328.kt @@ -6,9 +6,6 @@ // TARGET_BACKEND: JVM_IR // WITH_STDLIB -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - interface A { val x: Int } class B(@JvmField override val x: Int): A diff --git a/compiler/testData/ir/irText/expressions/memberTypeArguments.kt b/compiler/testData/ir/irText/expressions/memberTypeArguments.kt index 63e41950722..fab58d45f2b 100644 --- a/compiler/testData/ir/irText/expressions/memberTypeArguments.kt +++ b/compiler/testData/ir/irText/expressions/memberTypeArguments.kt @@ -1,8 +1,5 @@ // FIR_IDENTICAL -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class GenericClass(val value: T) { fun withNewValue(newValue: T) = GenericClass(newValue) } diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt index e33336953ef..822cf972c11 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt @@ -1,9 +1,6 @@ // FIR_IDENTICAL // TARGET_BACKEND: JVM -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - // FILE: samConversionInGenericConstructorCall.kt fun test3( f1: (String) -> String, diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt index 352a0ddf755..57c0329224f 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class Cell(val value: T) typealias IntAlias = Cell diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt index 7b096d2edc5..8e664e0ad00 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class Outer(val x: T) { open inner class Inner(val y: Int) } diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.kt b/compiler/testData/ir/irText/firProblems/ArrayMap.kt index 35ee41d36c9..55955fb3e10 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.kt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.kt @@ -3,9 +3,6 @@ // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - sealed class ArrayMap : Iterable { abstract val size: Int diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt index 5df97a5b302..c047e98fc54 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt @@ -3,7 +3,7 @@ // WITH_STDLIB // MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 +// ^ KT-57778 import java.lang.reflect.Type diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt index 36903ae1cc9..a308de1bf69 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt @@ -5,7 +5,7 @@ // IGNORE_BACKEND: JS_IR_ES6 // MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429, KT-57788 +// ^ KT-57788 interface SymbolOwner> diff --git a/compiler/testData/ir/irText/firProblems/OutBox.kt b/compiler/testData/ir/irText/firProblems/OutBox.kt index 77994ddb632..fe849807dca 100644 --- a/compiler/testData/ir/irText/firProblems/OutBox.kt +++ b/compiler/testData/ir/irText/firProblems/OutBox.kt @@ -1,8 +1,5 @@ // TARGET_BACKEND: JVM -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - // FILE: Foo.java public class Foo { diff --git a/compiler/testData/ir/irText/firProblems/SignatureComputationComplexJavaGeneric.kt b/compiler/testData/ir/irText/firProblems/SignatureComputationComplexJavaGeneric.kt index bb7a889cb3b..4748f89c3c9 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureComputationComplexJavaGeneric.kt +++ b/compiler/testData/ir/irText/firProblems/SignatureComputationComplexJavaGeneric.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: JVM_IR // MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 +// ^ KT-57022 // FILE: J.java diff --git a/compiler/testData/ir/irText/firProblems/TypeParameterInNestedClass.kt b/compiler/testData/ir/irText/firProblems/TypeParameterInNestedClass.kt index 8ab4ee26990..aff70e690cc 100644 --- a/compiler/testData/ir/irText/firProblems/TypeParameterInNestedClass.kt +++ b/compiler/testData/ir/irText/firProblems/TypeParameterInNestedClass.kt @@ -1,8 +1,5 @@ // ISSUE: KT-58008 -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - object Retry { class Builder( private val action: suspend () -> B, diff --git a/compiler/testData/ir/irText/firProblems/kt43342.kt b/compiler/testData/ir/irText/firProblems/kt43342.kt index cd7eb2426a2..2ddee9d703e 100644 --- a/compiler/testData/ir/irText/firProblems/kt43342.kt +++ b/compiler/testData/ir/irText/firProblems/kt43342.kt @@ -2,9 +2,6 @@ // IGNORE_BACKEND_K2: JS_IR // IGNORE_BACKEND_K2: JS_IR_ES6 -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - open class ControlFlowInfo(val map: Map): Map by map class StringFlowInfo(map: Map): ControlFlowInfo(map) { diff --git a/compiler/testData/ir/irText/firProblems/readWriteProperty.kt b/compiler/testData/ir/irText/firProblems/readWriteProperty.kt index 70fddc515b7..a8e03387a17 100644 --- a/compiler/testData/ir/irText/firProblems/readWriteProperty.kt +++ b/compiler/testData/ir/irText/firProblems/readWriteProperty.kt @@ -3,7 +3,7 @@ // DUMP_LOCAL_DECLARATION_SIGNATURES // MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429, KT-57430 +// ^ KT-57430 import kotlin.properties.ReadWriteProperty import kotlin.reflect.KClass diff --git a/compiler/testData/ir/irText/regressions/kt45236.kt b/compiler/testData/ir/irText/regressions/kt45236.kt index 8d8b7dee569..d9f7b23e1e8 100644 --- a/compiler/testData/ir/irText/regressions/kt45236.kt +++ b/compiler/testData/ir/irText/regressions/kt45236.kt @@ -2,9 +2,6 @@ // SKIP_KT_DUMP // TARGET_BACKEND: JVM_IR -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - import kotlin.contracts.ExperimentalContracts import kotlin.contracts.contract diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt index 18a328aad4e..a4b34cf3b13 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt @@ -1,6 +1,3 @@ -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - class A(val q: Q) typealias B = A diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt index 506318a8d54..5b6c5f344e6 100644 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt +++ b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt @@ -1,9 +1,6 @@ // IGNORE_BACKEND_K1: JS_IR // IGNORE_BACKEND_K1: JS_IR_ES6 -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - // MODULE: m1 // FILE: genericClassInDifferentModule_m1.kt diff --git a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.sig.kt.txt b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.sig.kt.txt index 4c8df6cfef0..04ed4919407 100644 --- a/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.sig.kt.txt +++ b/compiler/testData/ir/irText/stubs/genericClassInDifferentModule.sig.kt.txt @@ -78,6 +78,9 @@ class Derived1 : Base { // CHECK JVM_IR: // Mangled name: Derived1#(){}1:0 // Public signature: /Derived1.bar.|7899956589744407340[0] + // CHECK JS_IR: + // Mangled name: Derived1#(){} + // Public signature: /Derived1.bar.|6880642144337645699[0] override get // CHECK: // Mangled name: Derived1#(1:0){} @@ -92,6 +95,9 @@ class Derived1 : Base { // CHECK JVM_IR: // Mangled name: Derived1#foo(0:0){0§}1:0 // Public signature: /Derived1.foo|8673945311830780726[0] + // CHECK JS_IR: + // Mangled name: Derived1#foo(0:0){0§} + // Public signature: /Derived1.foo|-6838606926256314363[0] override fun foo(y: Y): T // CHECK: @@ -101,6 +107,9 @@ class Derived1 : Base { // CHECK JVM_IR: // Mangled name: Derived1#(){}1:0 // Public signature: /Derived1.x.|-8893883356128097563[0] + // CHECK JS_IR: + // Mangled name: Derived1#(){} + // Public signature: /Derived1.x.|1482705010654679335[0] /* fake */ override get(): T // CHECK: @@ -110,6 +119,9 @@ class Derived1 : Base { // CHECK JVM_IR: // Mangled name: Derived1#@0:0(){0§}1:0 // Public signature: /Derived1.exn.|6217753676739394662[0] + // CHECK JS_IR: + // Mangled name: Derived1#@0:0(){0§} + // Public signature: /Derived1.exn.|-202876889853335253[0] override get(): T // CHECK: // Mangled name: Derived1#@0:0(1:0){0§} diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt index 6d1995d0d9f..29dacd00944 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt @@ -1,7 +1,7 @@ // WITH_STDLIB // MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429, KT-57778 +// ^ KT-57778 import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/ir/irText/types/definitelyNotNullAsArgument.kt b/compiler/testData/ir/irText/types/definitelyNotNullAsArgument.kt index a43110661d4..7af84afc511 100644 --- a/compiler/testData/ir/irText/types/definitelyNotNullAsArgument.kt +++ b/compiler/testData/ir/irText/types/definitelyNotNullAsArgument.kt @@ -1,8 +1,5 @@ //!LANGUAGE: +DefinitelyNonNullableTypes -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - interface I { fun input(t: T) fun output(): T diff --git a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt index a295b418888..1c76d4292f2 100644 --- a/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt +++ b/compiler/testData/ir/irText/types/dontLeaveStubTypesInSetter.kt @@ -2,7 +2,7 @@ // WITH_STDLIB // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429, KT-57755 +// ^KT-57755 class Foo(var x: T) diff --git a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt index 27c49de6cd0..f251db37441 100644 --- a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt +++ b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt @@ -1,8 +1,5 @@ // !LANGUAGE: -ForbidUsingExtensionPropertyTypeParameterInDelegate -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - import kotlin.reflect.KProperty1 import kotlin.reflect.KMutableProperty1 import kotlin.reflect.KProperty diff --git a/compiler/testData/ir/irText/types/genericPropertyReferenceType.kt b/compiler/testData/ir/irText/types/genericPropertyReferenceType.kt index 5c941bc1d38..3acdaeeb56f 100644 --- a/compiler/testData/ir/irText/types/genericPropertyReferenceType.kt +++ b/compiler/testData/ir/irText/types/genericPropertyReferenceType.kt @@ -1,8 +1,5 @@ // FIR_IDENTICAL -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429, KT-57427 - import kotlin.reflect.KMutableProperty class C(var x: T) diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt index 53200da8e06..b7bcb4c452f 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt @@ -1,9 +1,6 @@ // TARGET_BACKEND: JVM // WITH_STDLIB -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - // FILE: enhancedNullabilityInDestructuringAssignment.kt fun use(x: Any, y: Any) {} diff --git a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.kt b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.kt index 71b87d1dcb6..d9b7c44ebb6 100644 --- a/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.kt +++ b/compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.kt @@ -1,8 +1,5 @@ // FIR_IDENTICAL -// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR -// ^ KT-57429 - fun testFunction(a: Any, b: Any) { a as MutableList b as String diff --git a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt index 838019cd272..d7c7b42ccf7 100644 --- a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt +++ b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt @@ -1,9 +1,6 @@ // KT-42036 // IGNORE_BACKEND: JS_IR -// MUTE_SIGNATURE_COMPARISON_K2: ANY -// ^ KT-57429 - typealias Action = (@UnsafeVariance RenderingT) -> Unit data class Tag(val action: Action)