[IR] Dump IdSignatures and mangled names in irText tests
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
This commit is contained in:
committed by
Space Team
parent
bccf69910d
commit
6e8283a6fe
@@ -0,0 +1,43 @@
|
||||
// CHECK:
|
||||
// Mangled name: {}equals
|
||||
// Public signature: /equals|-1340381053427629212[0]
|
||||
val equals: KFunction2<Z, Any?, Boolean>
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: #<get-equals>(){}kotlin.reflect.KFunction2<Z,kotlin.Any?,kotlin.Boolean>
|
||||
// Public signature: /equals.<get-equals>|5606412553566840313[0]
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Z
|
||||
// Public signature: /Z|null[0]
|
||||
@JvmInline
|
||||
value class Z {
|
||||
// CHECK:
|
||||
// Mangled name: Z{}s
|
||||
// Public signature: /Z.s|7217541905509134881[0]
|
||||
val s: String
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Z#<get-s>(){}kotlin.String
|
||||
// Public signature: /Z.s.<get-s>|4142379646177092803[0]
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Z#<init>(kotlin.String){}
|
||||
// Public signature: /Z.<init>|1280618353163213788[0]
|
||||
constructor(s: String) /* primary */
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Z#equals(kotlin.Any?){}kotlin.Boolean
|
||||
// Public signature: /Z.equals|722809408929142791[0]
|
||||
override operator fun equals(other: Any?): Boolean
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Z#hashCode(){}kotlin.Int
|
||||
// Public signature: /Z.hashCode|-8048879360829830756[0]
|
||||
override fun hashCode(): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Z#toString(){}kotlin.String
|
||||
// Public signature: /Z.toString|6958853723545266802[0]
|
||||
override fun toString(): String
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user