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
94 lines
2.4 KiB
Kotlin
Vendored
94 lines
2.4 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: A
|
|
// Public signature: /A|null[0]
|
|
abstract class A {
|
|
// CHECK:
|
|
// Mangled name: A{}x
|
|
// Public signature: /A.x|-8060530855978347579[0]
|
|
val x: B
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#<get-x>(){}B
|
|
// Public signature: /A.x.<get-x>|-4306177069200763996[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: A{}y
|
|
// Public signature: /A.y|3625903257357557171[0]
|
|
var y: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#<get-y>(){}kotlin.Int
|
|
// Public signature: /A.y.<get-y>|-6745575372101973707[0]
|
|
get
|
|
// CHECK:
|
|
// Mangled name: A#<set-y>(kotlin.Int){}
|
|
// Public signature: /A.y.<set-y>|2154335559382602722[0]
|
|
set
|
|
|
|
// CHECK:
|
|
// Mangled name: A#<init>(){}
|
|
// Public signature: /A.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: B
|
|
// Public signature: /B|null[0]
|
|
class B {
|
|
// CHECK:
|
|
// Mangled name: B#<init>(){}
|
|
// Public signature: /B.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: B#plusAssign(kotlin.Int){}
|
|
// Public signature: /B.plusAssign|3258359553712471205[0]
|
|
operator fun plusAssign(x: Int): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: Test1
|
|
// Public signature: /Test1|null[0]
|
|
class Test1 : A {
|
|
// CHECK:
|
|
// Mangled name: Test1#<init>(){}
|
|
// Public signature: /Test1.<init>|-5645683436151566731[0]
|
|
constructor()
|
|
|
|
// CHECK:
|
|
// Mangled name: Test1{}x
|
|
// Public signature: /Test1.x|-8060530855978347579[0]
|
|
/* fake */ override val x: B
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Test1#<get-x>(){}B
|
|
// Public signature: /Test1.x.<get-x>|-4306177069200763996[0]
|
|
/* fake */ override get(): B
|
|
|
|
// CHECK:
|
|
// Mangled name: Test1{}y
|
|
// Public signature: /Test1.y|3625903257357557171[0]
|
|
/* fake */ override var y: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Test1#<get-y>(){}kotlin.Int
|
|
// Public signature: /Test1.y.<get-y>|-6745575372101973707[0]
|
|
/* fake */ override get(): Int
|
|
// CHECK:
|
|
// Mangled name: Test1#<set-y>(kotlin.Int){}
|
|
// Public signature: /Test1.y.<set-y>|2154335559382602722[0]
|
|
/* fake */ override set(<set-?>: Int): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: Test2
|
|
// Public signature: /Test2|null[0]
|
|
class Test2 : J {
|
|
// CHECK:
|
|
// Mangled name: Test2#<init>(){}
|
|
// Public signature: /Test2.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
}
|
|
|