Files
kotlin-fork/compiler/testData/ir/irText/expressions/suspendConversionWithFunInterfaces.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

49 lines
1.3 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: SuspendRunnable
// Public signature: /SuspendRunnable|null[0]
fun interface SuspendRunnable {
// CHECK:
// Mangled name: SuspendRunnable#invoke(){}
// Public signature: /SuspendRunnable.invoke|-4663091332620260873[0]
abstract suspend fun invoke(): Unit
}
// CHECK:
// Mangled name: #bar1(){}
// Public signature: /bar1|1669926808669747346[0]
fun bar1(): Unit
// CHECK JVM_IR:
// Mangled name: #bar2(kotlin.String){}kotlin.Int
// Public signature: /bar2|3267780493794663662[0]
// CHECK JS_IR NATIVE:
// Mangled name: #bar2(kotlin.String){}
// Public signature: /bar2|871846488143355822[0]
fun bar2(s: String): Int
// CHECK:
// Mangled name: #bar3(){}
// Public signature: /bar3|-4458378888622542195[0]
fun bar3(): Unit
// CHECK JVM_IR:
// Mangled name: #bar3(kotlin.String){}kotlin.Int
// Public signature: /bar3|-5694254873370624097[0]
// CHECK JS_IR NATIVE:
// Mangled name: #bar3(kotlin.String){}
// Public signature: /bar3|-8604784325283105439[0]
suspend fun bar3(s: String): Int
// CHECK:
// Mangled name: #box(){}
// Public signature: /box|2173511048851971368[0]
fun box(): Unit
// CHECK:
// Mangled name: #foo1(SuspendRunnable){}
// Public signature: /foo1|-5121966172672447653[0]
fun foo1(s: SuspendRunnable): Unit