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
42 lines
1.3 KiB
Kotlin
Vendored
42 lines
1.3 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: Host
|
|
// Public signature: /Host|null[0]
|
|
class Host {
|
|
// CHECK:
|
|
// Mangled name: Host#<init>(){}
|
|
// Public signature: /Host.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: Host#testMembetExt1@kotlin.String(kotlin.Int;kotlin.String){}
|
|
// Public signature: /Host.testMembetExt1|8870420018904797729[0]
|
|
fun String.testMembetExt1(i: Int, j: String): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: Host#testMembetExt2@kotlin.String(kotlin.Int;0:0){0§<kotlin.Any?>}
|
|
// Public signature: /Host.testMembetExt2|7335072512555735434[0]
|
|
fun <T : Any?> String.testMembetExt2(i: Int, j: T): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: #test1(kotlin.Int;0:0){0§<kotlin.Any?>}
|
|
// Public signature: /test1|3909853005204725277[0]
|
|
fun <T : Any?> test1(i: Int, j: T): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: #test2(kotlin.Int;kotlin.String){}
|
|
// Public signature: /test2|7169768065709748599[0]
|
|
fun test2(i: Int, j: String): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: #test3(kotlin.Array<out|kotlin.String>...){}
|
|
// Public signature: /test3|-5387729831293380819[0]
|
|
fun test3(vararg args: String): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: #textExt1@kotlin.String(kotlin.Int;kotlin.String){}
|
|
// Public signature: /textExt1|-1442095296360892469[0]
|
|
fun String.textExt1(i: Int, j: String): Unit
|
|
|