[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
This commit is contained in:
Sergej Jaskiewicz
2023-04-11 17:23:10 +02:00
committed by Space Team
parent 5700212119
commit 1a29b9efff
56 changed files with 120 additions and 199 deletions
@@ -61,26 +61,22 @@ data class Result {
fun box(): String
// CHECK JVM_IR:
// Mangled name computed from Ir: #dec@Result(kotlin.Int){}Result
// Mangled name computed from Descriptor: #dec!kotlin.Int@Result(){}Result
// Mangled name: #dec!kotlin.Int@Result(){}Result
// Public signature: /dec|6054584114651390969[0]
operator fun Result.dec($context_receiver_0: Int): Result
// CHECK JVM_IR:
// Mangled name computed from Ir: #inc@Result(kotlin.Int){}Result
// Mangled name computed from Descriptor: #inc!kotlin.Int@Result(){}Result
// Mangled name: #inc!kotlin.Int@Result(){}Result
// Public signature: /inc|-6349683016158919485[0]
operator fun Result.inc($context_receiver_0: Int): Result
// CHECK JVM_IR:
// Mangled name computed from Ir: #unaryMinus@Result(kotlin.Int){}Result
// Mangled name computed from Descriptor: #unaryMinus!kotlin.Int@Result(){}Result
// Mangled name: #unaryMinus!kotlin.Int@Result(){}Result
// Public signature: /unaryMinus|-8891797954767898088[0]
operator fun Result.unaryMinus($context_receiver_0: Int): Result
// CHECK JVM_IR:
// Mangled name computed from Ir: #unaryPlus@Result(kotlin.Int){}Result
// Mangled name computed from Descriptor: #unaryPlus!kotlin.Int@Result(){}Result
// Mangled name: #unaryPlus!kotlin.Int@Result(){}Result
// Public signature: /unaryPlus|6329022242309077522[0]
operator fun Result.unaryPlus($context_receiver_0: Int): Result