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

44 lines
1.6 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: ObjectAssert
// Public signature: /ObjectAssert|null[0]
class ObjectAssert<ACTUAL : Any?> {
// CHECK:
// Mangled name: ObjectAssert#<init>(){}
// Public signature: /ObjectAssert.<init>|-5645683436151566731[0]
constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: ObjectAssert#describedAs(kotlin.String?;kotlin.Array<out|kotlin.Any?>...){}ObjectAssert<1:0>?
// Public signature: /ObjectAssert.describedAs|2640805776853081848[0]
// CHECK JS_IR NATIVE:
// Mangled name: ObjectAssert#describedAs(kotlin.String?;kotlin.Array<out|kotlin.Any?>...){}
// Public signature: /ObjectAssert.describedAs|-4390537078786909003[0]
fun describedAs(description: String?, vararg args: Any?): ObjectAssert<ACTUAL>?
}
// CHECK:
// Mangled name: Assertions
// Public signature: /Assertions|null[0]
object Assertions {
// CHECK:
// Mangled name: Assertions#<init>(){}
// Public signature: /Assertions.<init>|-5645683436151566731[0]
private constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: Assertions#assertThat(0:0){0§<kotlin.Any?>}ObjectAssert<0:0>
// Public signature: /Assertions.assertThat|4423159698393343609[0]
// CHECK JS_IR NATIVE:
// Mangled name: Assertions#assertThat(0:0){0§<kotlin.Any?>}
// Public signature: /Assertions.assertThat|4526101325959638422[0]
fun <S : Any?> assertThat(actual: S): ObjectAssert<S>
}
// CHECK:
// Mangled name: #assertNotNull@0:0?(kotlin.String?){0§<kotlin.Any>}
// Public signature: /assertNotNull|-8507040693411793741[0]
fun <T : Any> T?.assertNotNull(description: String?): Unit