Files
kotlin-fork/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.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

130 lines
4.8 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: A
// Public signature: /A|null[0]
sealed class A : CharSequence {
// CHECK:
// Mangled name: A.B
// Public signature: /A.B|null[0]
data class B : A, CharSequence {
// CHECK:
// Mangled name: A.B{}c
// Public signature: /A.B.c|-4416962153448040627[0]
val c: CharSequence
// CHECK JVM_IR:
// Mangled name: A.B#<get-c>(){}kotlin.CharSequence
// Public signature: /A.B.c.<get-c>|7304122790316032774[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#<get-c>(){}
// Public signature: /A.B.c.<get-c>|2368736057102379596[0]
get
// CHECK:
// Mangled name: A.B#<init>(kotlin.CharSequence){}
// Public signature: /A.B.<init>|2804354480087813081[0]
constructor(c: CharSequence) /* primary */
// CHECK JVM_IR:
// Mangled name: A.B#get(kotlin.Int){}kotlin.Char
// Public signature: /A.B.get|6519934306502810002[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#get(kotlin.Int){}
// Public signature: /A.B.get|-1406503945102116889[0]
override operator fun get(index: Int): Char
// CHECK JVM_IR:
// Mangled name: A.B#subSequence(kotlin.Int;kotlin.Int){}kotlin.CharSequence
// Public signature: /A.B.subSequence|7954975239934934955[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#subSequence(kotlin.Int;kotlin.Int){}
// Public signature: /A.B.subSequence|-1845048848187925290[0]
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
// CHECK JVM_IR:
// Mangled name: A.B#component1(){}kotlin.CharSequence
// Public signature: /A.B.component1|3907327938938556754[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#component1(){}
// Public signature: /A.B.component1|162597135895221648[0]
operator fun component1(): CharSequence
// CHECK JVM_IR:
// Mangled name: A.B#copy(kotlin.CharSequence){}A.B
// Public signature: /A.B.copy|-126682590898406005[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#copy(kotlin.CharSequence){}
// Public signature: /A.B.copy|4084600718380071781[0]
fun copy(c: CharSequence): B
// CHECK JVM_IR:
// Mangled name: A.B#equals(kotlin.Any?){}kotlin.Boolean
// Public signature: /A.B.equals|722809408929142791[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#equals(kotlin.Any?){}
// Public signature: /A.B.equals|4638265728071529943[0]
override operator fun equals(other: Any?): Boolean
// CHECK JVM_IR:
// Mangled name: A.B#hashCode(){}kotlin.Int
// Public signature: /A.B.hashCode|-8048879360829830756[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#hashCode(){}
// Public signature: /A.B.hashCode|3409210261493131192[0]
override fun hashCode(): Int
// CHECK JVM_IR:
// Mangled name: A.B#toString(){}kotlin.String
// Public signature: /A.B.toString|6958853723545266802[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#toString(){}
// Public signature: /A.B.toString|-1522858123163872138[0]
override fun toString(): String
// CHECK:
// Mangled name: A.B{}length
// Public signature: /A.B.length|8693345930578737573[0]
override val length: Int
// CHECK JVM_IR:
// Mangled name: A.B#<get-length>(){}kotlin.Int
// Public signature: /A.B.length.<get-length>|2176130084070422186[0]
// CHECK JS_IR NATIVE:
// Mangled name: A.B#<get-length>(){}
// Public signature: /A.B.length.<get-length>|-602852775465059526[0]
override get(): Int
}
// CHECK:
// Mangled name: A#<init>(){}
// Public signature: /A.<init>|-5645683436151566731[0]
protected constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: A#get(kotlin.Int){}kotlin.Char
// Public signature: /A.get|6519934306502810002[0]
// CHECK JS_IR NATIVE:
// Mangled name: A#get(kotlin.Int){}
// Public signature: /A.get|-1406503945102116889[0]
abstract /* fake */ override operator fun get(index: Int): Char
// CHECK JVM_IR:
// Mangled name: A#subSequence(kotlin.Int;kotlin.Int){}kotlin.CharSequence
// Public signature: /A.subSequence|7954975239934934955[0]
// CHECK JS_IR NATIVE:
// Mangled name: A#subSequence(kotlin.Int;kotlin.Int){}
// Public signature: /A.subSequence|-1845048848187925290[0]
abstract /* fake */ override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
// CHECK:
// Mangled name: A{}length
// Public signature: /A.length|8693345930578737573[0]
abstract /* fake */ override val length: Int
// CHECK JVM_IR:
// Mangled name: A#<get-length>(){}kotlin.Int
// Public signature: /A.length.<get-length>|2176130084070422186[0]
// CHECK JS_IR NATIVE:
// Mangled name: A#<get-length>(){}
// Public signature: /A.length.<get-length>|-602852775465059526[0]
abstract /* fake */ override get(): Int
}