6e8283a6fe
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
61 lines
1.8 KiB
Kotlin
Vendored
61 lines
1.8 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: {}aFloat
|
|
// Public signature: /aFloat|4391422460504083106[0]
|
|
val aFloat: A<Float>
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #<get-aFloat>(){}A<kotlin.Float>
|
|
// Public signature: /aFloat.<get-aFloat>|-8376703976384589815[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: #<get-aFloat>(){}
|
|
// Public signature: /aFloat.<get-aFloat>|627878515739608177[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: {}aInt
|
|
// Public signature: /aInt|-6794586520969567401[0]
|
|
val aInt: Float
|
|
// CHECK JVM_IR:
|
|
// Mangled name: #<get-aInt>(){}kotlin.Float
|
|
// Public signature: /aInt.<get-aInt>|-2970752737551036436[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: #<get-aInt>(){}
|
|
// Public signature: /aInt.<get-aInt>|-5118867187575203172[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: A
|
|
// Public signature: /A|null[0]
|
|
class A<T : Any?> {
|
|
// CHECK:
|
|
// Mangled name: A{}value
|
|
// Public signature: /A.value|1987073854177347439[0]
|
|
private val value: T
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#<get-value>(){}1:0
|
|
// Public signature: /A.value.<get-value>|3167862337988859752[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: A#<get-value>(){}
|
|
// Public signature: /A.value.<get-value>|3260093555963109437[0]
|
|
private get
|
|
|
|
// CHECK:
|
|
// Mangled name: A#<init>(1:0){}
|
|
// Public signature: /A.<init>|-8731461708390519279[0]
|
|
constructor(value: T) /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#get(kotlin.Int){}1:0
|
|
// Public signature: /A.get|4109019764351174315[0]
|
|
// CHECK JS_IR NATIVE:
|
|
// Mangled name: A#get(kotlin.Int){}
|
|
// Public signature: /A.get|-1406503945102116889[0]
|
|
operator fun get(i: Int): T
|
|
|
|
// CHECK:
|
|
// Mangled name: A#set(kotlin.Int;1:0){}
|
|
// Public signature: /A.set|366827667513302185[0]
|
|
operator fun set(i: Int, v: T): Unit
|
|
|
|
}
|
|
|