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
77 lines
2.1 KiB
Kotlin
Vendored
77 lines
2.1 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: CBoth
|
|
// Public signature: /CBoth|null[0]
|
|
class CBoth : ILeft, IRight {
|
|
// CHECK:
|
|
// Mangled name: CBoth#<init>(){}
|
|
// Public signature: /CBoth.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: CBoth#foo(){}
|
|
// Public signature: /CBoth.foo|-1041209573719867811[0]
|
|
override fun foo(): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: CBoth{}bar
|
|
// Public signature: /CBoth.bar|-7864284097863469857[0]
|
|
override val bar: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: CBoth#<get-bar>(){}kotlin.Int
|
|
// Public signature: /CBoth.bar.<get-bar>|-7403724005139201014[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: CBoth#<get-bar>(){}
|
|
// Public signature: /CBoth.bar.<get-bar>|6880642144337645699[0]
|
|
override get(): Int
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: ILeft
|
|
// Public signature: /ILeft|null[0]
|
|
interface ILeft {
|
|
|
|
// CHECK:
|
|
// Mangled name: ILeft#foo(){}
|
|
// Public signature: /ILeft.foo|-1041209573719867811[0]
|
|
fun foo(): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: ILeft{}bar
|
|
// Public signature: /ILeft.bar|-7864284097863469857[0]
|
|
val bar: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: ILeft#<get-bar>(){}kotlin.Int
|
|
// Public signature: /ILeft.bar.<get-bar>|-7403724005139201014[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: ILeft#<get-bar>(){}
|
|
// Public signature: /ILeft.bar.<get-bar>|6880642144337645699[0]
|
|
get(): Int
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: IRight
|
|
// Public signature: /IRight|null[0]
|
|
interface IRight {
|
|
|
|
// CHECK:
|
|
// Mangled name: IRight#foo(){}
|
|
// Public signature: /IRight.foo|-1041209573719867811[0]
|
|
fun foo(): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: IRight{}bar
|
|
// Public signature: /IRight.bar|-7864284097863469857[0]
|
|
val bar: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: IRight#<get-bar>(){}kotlin.Int
|
|
// Public signature: /IRight.bar.<get-bar>|-7403724005139201014[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: IRight#<get-bar>(){}
|
|
// Public signature: /IRight.bar.<get-bar>|6880642144337645699[0]
|
|
get(): Int
|
|
|
|
}
|
|
|