6e8283a6fe
The reason #1 for this feature is that we want to test IdSignatures generated for declarations. Currently, there is no (easy) way to ensure that a change in the signature building logic doesn't cause any breaking changes wrt klibs. Now, most IdSignatures include hashed mangled names in them, so even if we catch a regression where the included hash changes, there would be no way of knowing immediately what caused it, unless we'd also have mangled names in the expectations. The reason #2 is to test the manglers themselves. Currently, there are no tests for them. They heavily duplicate each other, this is already causing issues (see KT-57427) that would be very hard to catch without these tests. ^KT-58238 Fixed
66 lines
2.4 KiB
Kotlin
Vendored
66 lines
2.4 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: MyContainer
|
|
// Public signature: /MyContainer|null[0]
|
|
data class MyContainer {
|
|
// CHECK:
|
|
// Mangled name: MyContainer{}s
|
|
// Public signature: /MyContainer.s|7217541905509134881[0]
|
|
var s: String
|
|
// CHECK JVM_IR:
|
|
// Mangled name: MyContainer#<get-s>(){}kotlin.String
|
|
// Public signature: /MyContainer.s.<get-s>|4142379646177092803[0]
|
|
get
|
|
// CHECK:
|
|
// Mangled name: MyContainer#<set-s>(kotlin.String){}
|
|
// Public signature: /MyContainer.s.<set-s>|8225901422521337963[0]
|
|
set
|
|
|
|
// CHECK:
|
|
// Mangled name: MyContainer#<init>(kotlin.String){}
|
|
// Public signature: /MyContainer.<init>|1280618353163213788[0]
|
|
constructor(s: String) /* primary */
|
|
// CHECK JVM_IR:
|
|
// Mangled name: MyContainer#component1(){}kotlin.String
|
|
// Public signature: /MyContainer.component1|-7481405593404337796[0]
|
|
operator fun component1(): String
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: MyContainer#copy(kotlin.String){}MyContainer
|
|
// Public signature: /MyContainer.copy|-9194766205182052641[0]
|
|
fun copy(s: String): MyContainer
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: MyContainer#equals(kotlin.Any?){}kotlin.Boolean
|
|
// Public signature: /MyContainer.equals|722809408929142791[0]
|
|
override operator fun equals(other: Any?): Boolean
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: MyContainer#hashCode(){}kotlin.Int
|
|
// Public signature: /MyContainer.hashCode|-8048879360829830756[0]
|
|
override fun hashCode(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: MyContainer#toString(){}kotlin.String
|
|
// Public signature: /MyContainer.toString|6958853723545266802[0]
|
|
override fun toString(): String
|
|
|
|
}
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #box(){}kotlin.String
|
|
// Public signature: /box|-9347091776561469[0]
|
|
fun box(): String
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name computed from Ir: #get@MyContainer(kotlin.Int;kotlin.Int){}kotlin.String?
|
|
// Mangled name computed from Descriptor: #get!kotlin.Int@MyContainer(kotlin.Int){}kotlin.String?
|
|
// Public signature: /get|-262764729710480185[0]
|
|
operator fun MyContainer.get($context_receiver_0: Int, index: Int): String?
|
|
|
|
// CHECK:
|
|
// Mangled name computed from Ir: #set@MyContainer(kotlin.Int;kotlin.Int;kotlin.String){}
|
|
// Mangled name computed from Descriptor: #set!kotlin.Int@MyContainer(kotlin.Int;kotlin.String){}
|
|
// Public signature: /set|1694887052182048775[0]
|
|
operator fun MyContainer.set($context_receiver_0: Int, index: Int, value: String): Unit
|
|
|