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

38 lines
1.5 KiB
Kotlin
Vendored

// CHECK JVM_IR:
// Mangled name: #test1(kotlin.String?){}kotlin.Int
// Public signature: /test1|-5345400542874052925[0]
// CHECK JS_IR NATIVE:
// Mangled name: #test1(kotlin.String?){}
// Public signature: /test1|-2987894258831182637[0]
fun test1(x: String?): Int
// CHECK JVM_IR:
// Mangled name: #test2(0:0){0§<kotlin.CharSequence?>}kotlin.Int
// Public signature: /test2|-7282113506340032628[0]
// CHECK JS_IR NATIVE:
// Mangled name: #test2(0:0){0§<kotlin.CharSequence?>}
// Public signature: /test2|-8782669618551409801[0]
fun <T : CharSequence?> test2(x: T): Int
// CHECK JVM_IR:
// Mangled name: #test3(kotlin.Any){0§<kotlin.CharSequence?>}kotlin.Int
// Public signature: /test3|7450825797678601496[0]
// CHECK JS_IR NATIVE:
// Mangled name: #test3(kotlin.Any){0§<kotlin.CharSequence?>}
// Public signature: /test3|7453698813177303629[0]
inline fun <reified T : CharSequence?> test3(x: Any): Int
// CHECK JVM_IR:
// Mangled name: #test4(kotlin.Any?){0§<kotlin.CharSequence>}kotlin.Int
// Public signature: /test4|-5896625443167857513[0]
// CHECK JS_IR NATIVE:
// Mangled name: #test4(kotlin.Any?){0§<kotlin.CharSequence>}
// Public signature: /test4|-668443391893184404[0]
inline fun <reified T : CharSequence> test4(x: Any?): Int
// CHECK:
// Mangled name: #test5(0:0;kotlin.Function1<0:1,kotlin.Unit>){0§<0:1?>;1§<kotlin.Any?>}
// Public signature: /test5|-2340660044410176183[0]
fun <T : S?, S : Any?> test5(x: T, fn: Function1<S, Unit>): Unit