Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.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

60 lines
2.0 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: Context
// Public signature: /Context|null[0]
class Context {
// CHECK:
// Mangled name: Context#<init>(){}
// Public signature: /Context.<init>|-5645683436151566731[0]
// Public signature debug description: <init>(){}
constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: Context#foo(){}kotlin.Int
// Public signature: /Context.foo|-1256155405684507276[0]
// Public signature debug description: foo(){}kotlin.Int
// CHECK JS_IR NATIVE:
// Mangled name: Context#foo(){}
// Public signature: /Context.foo|-1041209573719867811[0]
// Public signature debug description: foo(){}
fun foo(): Int
}
// CHECK:
// Mangled name: Test
// Public signature: /Test|null[0]
class Test {
// CHECK:
// Mangled name: Test#<init>!Context(){}
// Public signature: /Test.<init>|4848133296495274545[0]
// Public signature debug description: <init>!Context(){}
constructor($context_receiver_0: Context) /* primary */
// CHECK JVM_IR:
// Mangled name: Test.contextReceiverField0
// Mangled name for the signature computed from Ir:
// Mangled name for the signature computed from Descriptor: {}contextReceiverField0#jf
// CHECK JS_IR NATIVE:
// Mangled name: Test.contextReceiverField0
// Mangled name for the signature computed from Ir:
// Mangled name for the signature computed from Descriptor: {}contextReceiverField0
private /* final field */ val contextReceiverField0: Context
// CHECK:
// Mangled name: Test#bar(){}
// Public signature: /Test.bar|496682602797471549[0]
// Public signature debug description: bar(){}
fun bar(): Unit
// CHECK JVM_IR:
// Mangled name: Test#foo(){}kotlin.Int
// Public signature: /Test.foo|-1256155405684507276[0]
// Public signature debug description: foo(){}kotlin.Int
// CHECK JS_IR NATIVE:
// Mangled name: Test#foo(){}
// Public signature: /Test.foo|-1041209573719867811[0]
// Public signature debug description: foo(){}
fun foo(): Int
}