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
83 lines
2.4 KiB
Kotlin
Vendored
83 lines
2.4 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: Z
|
|
// Public signature: /Z|null[0]
|
|
object Z {
|
|
// CHECK:
|
|
// Mangled name: Z{}counter
|
|
// Public signature: /Z.counter|3849500605769271673[0]
|
|
var counter: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Z#<get-counter>(){}kotlin.Int
|
|
// Public signature: /Z.counter.<get-counter>|6416265643848993228[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Z#<get-counter>(){}
|
|
// Public signature: /Z.counter.<get-counter>|6903507550118978958[0]
|
|
get
|
|
// CHECK:
|
|
// Mangled name: Z#<set-counter>(kotlin.Int){}
|
|
// Public signature: /Z.counter.<set-counter>|-8124462411591632783[0]
|
|
set
|
|
|
|
// CHECK:
|
|
// Mangled name: Z{}aLambda
|
|
// Public signature: /Z.aLambda|3337321219156655813[0]
|
|
val aLambda: Function0<Unit>
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Z#<get-aLambda>(){}kotlin.Function0<kotlin.Unit>
|
|
// Public signature: /Z.aLambda.<get-aLambda>|9058518221524596568[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Z#<get-aLambda>(){}
|
|
// Public signature: /Z.aLambda.<get-aLambda>|8927671768328125269[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: Z{}anObject
|
|
// Public signature: /Z.anObject|409091113626572731[0]
|
|
val anObject: Any
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Z#<get-anObject>(){}kotlin.Any
|
|
// Public signature: /Z.anObject.<get-anObject>|-6807306499596507825[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: Z#<get-anObject>(){}
|
|
// Public signature: /Z.anObject.<get-anObject>|6468357437342963609[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: Z.Nested
|
|
// Public signature: /Z.Nested|null[0]
|
|
class Nested {
|
|
// CHECK:
|
|
// Mangled name: Z.Nested#<init>(){}
|
|
// Public signature: /Z.Nested.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: Z.Nested#test(){}
|
|
// Public signature: /Z.Nested.test|6620506149988718649[0]
|
|
fun test(): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: Z#<init>(){}
|
|
// Public signature: /Z.<init>|-5645683436151566731[0]
|
|
private constructor() /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: Z#bar(){}
|
|
// Public signature: /Z.bar|496682602797471549[0]
|
|
fun bar(): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: Z#foo(){}
|
|
// Public signature: /Z.foo|-1041209573719867811[0]
|
|
fun foo(): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: #test@Z(){}
|
|
// Public signature: /test|2491484829934192138[0]
|
|
fun Z.test(): Unit
|
|
|