Files
kotlin-fork/compiler/testData/ir/irText/classes/47424.sig.kt.txt
T
Sergej Jaskiewicz 6e8283a6fe [IR] Dump IdSignatures and mangled names in irText tests
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
2023-05-15 18:20:45 +00:00

88 lines
2.2 KiB
Kotlin
Vendored

package com.example
// CHECK:
// Mangled name: com.example.Aa
// Public signature: com.example/Aa|null[0]
interface Aa {
}
// CHECK:
// Mangled name: com.example.Ab
// Public signature: com.example/Ab|null[0]
interface Ab<T : Ab<T>> : Aa {
}
// CHECK:
// Mangled name: com.example.Ba
// Public signature: com.example/Ba|null[0]
interface Ba {
}
// CHECK:
// Mangled name: com.example.Bb
// Public signature: com.example/Bb|null[0]
interface Bb<T : Bb<T>> : Ab<T>, Ba {
}
// CHECK:
// Mangled name: com.example.C
// Public signature: com.example/C|null[0]
interface C : Ca, Cb {
// CHECK:
// Mangled name: com.example.C{}b
// Public signature: com.example/C.b|772347207915745207[0]
abstract /* fake */ override val b: Bb<*>
// CHECK JVM_IR:
// Mangled name: com.example.C#<get-b>(){}com.example.Bb<*>
// Public signature: com.example/C.b.<get-b>|8945515346267380674[0]
// CHECK JS_IR NATIVE:
// Mangled name: com.example.C#<get-b>(){}
// Public signature: com.example/C.b.<get-b>|812004636995167743[0]
abstract /* fake */ override get(): Bb<*>
}
// CHECK:
// Mangled name: com.example.Ca
// Public signature: com.example/Ca|null[0]
interface Ca {
// CHECK:
// Mangled name: com.example.Ca{}b
// Public signature: com.example/Ca.b|772347207915745207[0]
abstract val b: Ba
// CHECK JVM_IR:
// Mangled name: com.example.Ca#<get-b>(){}com.example.Ba
// Public signature: com.example/Ca.b.<get-b>|-5371331002991031414[0]
// CHECK JS_IR NATIVE:
// Mangled name: com.example.Ca#<get-b>(){}
// Public signature: com.example/Ca.b.<get-b>|812004636995167743[0]
abstract get
}
// CHECK:
// Mangled name: com.example.Cb
// Public signature: com.example/Cb|null[0]
interface Cb {
// CHECK:
// Mangled name: com.example.Cb{}b
// Public signature: com.example/Cb.b|772347207915745207[0]
abstract val b: Bb<*>
// CHECK JVM_IR:
// Mangled name: com.example.Cb#<get-b>(){}com.example.Bb<*>
// Public signature: com.example/Cb.b.<get-b>|8945515346267380674[0]
// CHECK JS_IR NATIVE:
// Mangled name: com.example.Cb#<get-b>(){}
// Public signature: com.example/Cb.b.<get-b>|812004636995167743[0]
abstract get
}