[FIR] Fix handling of type parameters in FIR mangling

#KT-57429 Fixed
This commit is contained in:
Kirill Rakhman
2023-06-05 17:31:27 +02:00
committed by Space Team
parent 938dd65881
commit 67fc46a190
48 changed files with 199 additions and 141 deletions
@@ -1,8 +1,5 @@
// FIR_IDENTICAL
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
package test
class Foo<T> {
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
open class L<LL>(val ll: LL)
class Rec<T>(val rt: T)
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
fun testSimple() = Box<Long>(2L * 3)
inline fun <reified T> testArray(n: Int, crossinline block: () -> T): Array<T> {
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
class Value<T>(var value: T = null as T, var text: String? = null)
val <T> Value<T>.additionalText by DVal(Value<T>::text)
-3
View File
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
class A<T>(private val value: T) {
operator fun get(i: Int) = value
operator fun set(i: Int, v: T) {}
-3
View File
@@ -3,9 +3,6 @@
// WITH_STDLIB
// SKIP_KT_DUMP
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57429
// FILE: kt44993.kt
fun f(r: KotlinBox<JavaBox>): String =
r?.data?.element!!
-3
View File
@@ -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
@@ -1,8 +1,5 @@
// FIR_IDENTICAL
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
class GenericClass<T>(val value: T) {
fun withNewValue(newValue: T) = GenericClass(newValue)
}
@@ -1,9 +1,6 @@
// FIR_IDENTICAL
// TARGET_BACKEND: JVM
// MUTE_SIGNATURE_COMPARISON_K2: ANY
// ^ KT-57429
// FILE: samConversionInGenericConstructorCall.kt
fun test3(
f1: (String) -> String,
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
class Cell<T>(val value: T)
typealias IntAlias = Cell<Int>
@@ -1,6 +1,3 @@
// MUTE_SIGNATURE_COMPARISON_K2: JVM_IR
// ^ KT-57429
class Outer<T>(val x: T) {
open inner class Inner(val y: Int)
}