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
62 lines
1.8 KiB
Kotlin
Vendored
62 lines
1.8 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: State
|
|
// Public signature: /State|null[0]
|
|
open annotation class State : Annotation {
|
|
// CHECK:
|
|
// Mangled name: State{}name
|
|
// Public signature: /State.name|4231860309499509769[0]
|
|
val name: String
|
|
// CHECK JVM_IR:
|
|
// Mangled name: State#<get-name>(){}kotlin.String
|
|
// Public signature: /State.name.<get-name>|-8006111524522882650[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: State{}storages
|
|
// Public signature: /State.storages|6878252279913860320[0]
|
|
val storages: Array<Storage>
|
|
// CHECK JVM_IR:
|
|
// Mangled name: State#<get-storages>(){}kotlin.Array<Storage>
|
|
// Public signature: /State.storages.<get-storages>|3736036355422962101[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: State#<init>(kotlin.String;kotlin.Array<Storage>){}
|
|
// Public signature: /State.<init>|-8165230928430738910[0]
|
|
constructor(name: String, storages: Array<Storage>) /* primary */
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: Storage
|
|
// Public signature: /Storage|null[0]
|
|
open annotation class Storage : Annotation {
|
|
// CHECK:
|
|
// Mangled name: Storage{}value
|
|
// Public signature: /Storage.value|1987073854177347439[0]
|
|
val value: String
|
|
// CHECK JVM_IR:
|
|
// Mangled name: Storage#<get-value>(){}kotlin.String
|
|
// Public signature: /Storage.value.<get-value>|-7202092821145242726[0]
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: Storage#<init>(kotlin.String){}
|
|
// Public signature: /Storage.<init>|1280618353163213788[0]
|
|
constructor(value: String) /* primary */
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: Test
|
|
// Public signature: /Test|null[0]
|
|
@State(name = "1", storages = [Storage(value = "HELLO")])
|
|
class Test {
|
|
// CHECK:
|
|
// Mangled name: Test#<init>(){}
|
|
// Public signature: /Test.<init>|-5645683436151566731[0]
|
|
constructor() /* primary */
|
|
|
|
}
|
|
|