Files
kotlin-fork/compiler/testData/ir/irText/firProblems/AssignmentOperator.sig.kt.txt
T
Sergej Jaskiewicz 69aeddcba8 [IR] In irText tests, test full mangled names only computed from IR
We plan to disable computing full mangled names of declarations in all
manglers except the IR mangler (see the subsequent commits).

From now on, in irText tests we dump only the following mangled names:

- Full mangled names computed using the IR mangler
- Signature mangled names computed using the Descriptor mangler
- Signature mangled names computed using the IR mangler
- Signature mangled names computed using the FIR mangler

Here by a full mangled name we mean the mangled name of a declaration
computed using the `MangleMode.FULL` mode. Those mangled names include
the mangled names of the declaration'a parents.

By a signature mangled name we mean the mangled name of a declaration
computed using the `MangleMode.SIGNATURE` mode.
These mangled names are used to compute an `IdSignature` for
the declaration, hence the name.
2023-11-10 12:31:40 +00:00

103 lines
3.7 KiB
Kotlin
Vendored

package foo
// CHECK:
// Mangled name: foo{}array
// Public signature: foo/array|6187513897999240281[0]
// Public signature debug description: {}array
val array: Array<Int>
// CHECK JVM_IR:
// Mangled name: foo#<get-array>(){}kotlin.Array<kotlin.Int>
// Public signature: foo/array.<get-array>|7467926770652597701[0]
// Public signature debug description: <get-array>(){}kotlin.Array<kotlin.Int>
// CHECK JS_IR NATIVE:
// Mangled name: foo#<get-array>(){}
// Public signature: foo/array.<get-array>|-7741494344808015919[0]
// Public signature debug description: <get-array>(){}
get
// CHECK:
// Mangled name: foo.A
// Public signature: foo/A|null[0]
class A {
// CHECK:
// Mangled name: foo.A{}prop
// Public signature: foo/A.prop|3598315380056892812[0]
// Public signature debug description: {}prop
var prop: Int
// CHECK JVM_IR:
// Mangled name: foo.A#<get-prop>(){}kotlin.Int
// Public signature: foo/A.prop.<get-prop>|-2094203252476742575[0]
// Public signature debug description: <get-prop>(){}kotlin.Int
// CHECK JS_IR NATIVE:
// Mangled name: foo.A#<get-prop>(){}
// Public signature: foo/A.prop.<get-prop>|-5734736374948136327[0]
// Public signature debug description: <get-prop>(){}
get
// CHECK:
// Mangled name: foo.A#<set-prop>(kotlin.Int){}
// Public signature: foo/A.prop.<set-prop>|3724820243841906450[0]
// Public signature debug description: <set-prop>(kotlin.Int){}
set
// CHECK:
// Mangled name: foo.A#<init>(){}
// Public signature: foo/A.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
}
// CHECK:
// Mangled name: foo.B
// Public signature: foo/B|null[0]
object B {
// CHECK:
// Mangled name: foo.B{}prop
// Public signature: foo/B.prop|3598315380056892812[0]
// Public signature debug description: {}prop
var prop: Int
// CHECK JVM_IR:
// Mangled name: foo.B#<get-prop>(){}kotlin.Int
// Public signature: foo/B.prop.<get-prop>|-2094203252476742575[0]
// Public signature debug description: <get-prop>(){}kotlin.Int
// CHECK JS_IR NATIVE:
// Mangled name: foo.B#<get-prop>(){}
// Public signature: foo/B.prop.<get-prop>|-5734736374948136327[0]
// Public signature debug description: <get-prop>(){}
get
// CHECK:
// Mangled name: foo.B#<set-prop>(kotlin.Int){}
// Public signature: foo/B.prop.<set-prop>|3724820243841906450[0]
// Public signature debug description: <set-prop>(kotlin.Int){}
set
// CHECK:
// Mangled name: foo.B#<init>(){}
// Public signature: foo/B.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
private constructor() /* primary */
}
// CHECK JVM_IR:
// Mangled name: foo#id(0:0){0§<kotlin.Any?>}0:0
// Public signature: foo/id|-6791396263062521506[0]
// Public signature debug description: id(0:0){0§<kotlin.Any?>}0:0
// CHECK JS_IR NATIVE:
// Mangled name: foo#id(0:0){0§<kotlin.Any?>}
// Public signature: foo/id|9187295668833355463[0]
// Public signature debug description: id(0:0){0§<kotlin.Any?>}
fun <T : Any?> id(t: T): T
// CHECK JVM_IR:
// Mangled name: foo#main(){}
// Mangled name for the signature computed from Ir: main(){}
// Mangled name for the signature computed from Descriptor: main(){}%AssignmentOperator.kt
// Public signature: foo/main|7392120756922895329[0]
// Public signature debug description: main(){}%AssignmentOperator.kt
// CHECK JS_IR NATIVE:
// Mangled name: foo#main(){}
// Public signature: foo/main|-4284757841571462650[0]
// Public signature debug description: main(){}
fun main(): Unit