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
69 lines
2.2 KiB
Kotlin
Vendored
69 lines
2.2 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: Base
|
|
// Public signature: /Base|null[0]
|
|
open class Base {
|
|
// CHECK:
|
|
// Mangled name: Base{}f1
|
|
// Public signature: /Base.f1|-3626880138223960403[0]
|
|
val f1: Function0<Any>
|
|
field
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Base#<get-f1>(){}kotlin.Function0<kotlin.Any>
|
|
// Public signature: /Base.f1.<get-f1>|8566118280674785385[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Base#<get-f1>(){}
|
|
// Public signature: /Base.f1.<get-f1>|-4995485398991269878[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: Base#<init>(kotlin.Function0<kotlin.Any>){}
|
|
// Public signature: /Base.<init>|-4146636346230466645[0]
|
|
constructor(f1: Function0<Any>) /* primary */
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: Thing
|
|
// Public signature: /Thing|null[0]
|
|
object Thing : Base {
|
|
// CHECK:
|
|
// Mangled name: Thing#<init>(){}
|
|
// Public signature: /Thing.<init>|-5645683436151566731[0]
|
|
private constructor() /* primary */
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Thing#<init>(){}#<anonymous>#static(){}kotlin.Any
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Thing#<init>(){}#<anonymous>#static(){}
|
|
local fun <anonymous>(): Any
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Thing#test1(){}Thing
|
|
// Public signature: /Thing.test1|3967638963180272121[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Thing#test1(){}
|
|
// Public signature: /Thing.test1|4297044443957252634[0]
|
|
fun test1(): Thing
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Thing#test2(){}Thing
|
|
// Public signature: /Thing.test2|-7201124175106784013[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Thing#test2(){}
|
|
// Public signature: /Thing.test2|4279114864133353152[0]
|
|
fun test2(): Thing
|
|
|
|
// CHECK:
|
|
// Mangled name: Thing{}f1
|
|
// Public signature: /Thing.f1|-3626880138223960403[0]
|
|
/* fake */ override val f1: Function0<Any>
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Thing#<get-f1>(){}kotlin.Function0<kotlin.Any>
|
|
// Public signature: /Thing.f1.<get-f1>|8566118280674785385[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Thing#<get-f1>(){}
|
|
// Public signature: /Thing.f1.<get-f1>|-4995485398991269878[0]
|
|
/* fake */ override get(): Function0<Any>
|
|
|
|
}
|
|
|