Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/contextReceiverMethod.sig.kt.txt
T
Sergej Jaskiewicz 1a29b9efff [FIR, IR] Fix name mangling for functions with context receivers
- Mangled names of property accessors now include context receiver
  types of the corresponding property when computed from FIR.
- Context receivers are now supported when computing mangled names
  from IR
- IrBasedDescriptors now account for context receivers

^KT-57435 Fixed
2023-05-23 08:55:50 +00:00

51 lines
1.5 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]
constructor() /* primary */
// CHECK JVM_IR:
// Mangled name: Context#foo(){}kotlin.Int
// Public signature: /Context.foo|-1256155405684507276[0]
// CHECK JS_IR:
// Mangled name: Context#foo(){}
// Public signature: /Context.foo|-1041209573719867811[0]
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]
constructor($context_receiver_0: Context) /* primary */
// CHECK JVM_IR:
// Mangled name computed from Ir: Test.contextReceiverField0
// Mangled name computed from Descriptor: Test{}contextReceiverField0#jf
// CHECK JS_IR NATIVE:
// Mangled name computed from Ir: Test.contextReceiverField0
// Mangled name computed from Descriptor: Test{}contextReceiverField0
private /* final field */ val contextReceiverField0: Context
// CHECK:
// Mangled name: Test#bar(){}
// Public signature: /Test.bar|496682602797471549[0]
fun bar(): Unit
// CHECK JVM_IR:
// Mangled name: Test#foo(){}kotlin.Int
// Public signature: /Test.foo|-1256155405684507276[0]
// CHECK JS_IR:
// Mangled name: Test#foo(){}
// Public signature: /Test.foo|-1041209573719867811[0]
fun foo(): Int
}