[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:
committed by
Space Team
parent
5700212119
commit
1a29b9efff
@@ -112,6 +112,11 @@ open class FirMangleComputer(
|
||||
builder.appendSignature(MangleConstant.STATIC_MEMBER_MARK)
|
||||
}
|
||||
|
||||
val contextReceivers = when (this) {
|
||||
is FirPropertyAccessor -> propertySymbol.fir.contextReceivers
|
||||
else -> this.contextReceivers
|
||||
}
|
||||
|
||||
contextReceivers.forEach {
|
||||
builder.appendSignature(MangleConstant.CONTEXT_RECEIVER_PREFIX)
|
||||
mangleType(builder, it.typeRef.coneType, moduleData.session)
|
||||
|
||||
@@ -396,10 +396,27 @@ open class IrBasedVariableDescriptorWithAccessor(owner: IrLocalDelegatedProperty
|
||||
|
||||
fun IrLocalDelegatedProperty.toIrBasedDescriptor() = IrBasedVariableDescriptorWithAccessor(this)
|
||||
|
||||
abstract class IrBasedFunctionDescriptor<Function : IrFunction>(owner: Function) : IrBasedCallableDescriptor<Function>(owner) {
|
||||
|
||||
override fun getExtensionReceiverParameter() = owner.extensionReceiverParameter?.toIrBasedDescriptor() as? ReceiverParameterDescriptor
|
||||
|
||||
override fun getContextReceiverParameters() = owner.valueParameters
|
||||
.asSequence()
|
||||
.take(owner.contextReceiverParametersCount)
|
||||
.map(::IrBasedReceiverParameterDescriptor)
|
||||
.toMutableList()
|
||||
|
||||
override fun getValueParameters() = owner.valueParameters
|
||||
.asSequence()
|
||||
.drop(owner.contextReceiverParametersCount)
|
||||
.map(::IrBasedValueParameterDescriptor)
|
||||
.toMutableList()
|
||||
}
|
||||
|
||||
// We make all IR-based function descriptors instances of DescriptorWithContainerSource, and use .parentClassId to
|
||||
// check whether declaration is deserialized. See IrInlineCodegen.descriptorIsDeserialized
|
||||
open class IrBasedSimpleFunctionDescriptor(owner: IrSimpleFunction) : SimpleFunctionDescriptor, DescriptorWithContainerSource,
|
||||
IrBasedCallableDescriptor<IrSimpleFunction>(owner) {
|
||||
IrBasedFunctionDescriptor<IrSimpleFunction>(owner) {
|
||||
|
||||
override fun getOverriddenDescriptors(): List<FunctionDescriptor> = owner.overriddenSymbols.memoryOptimizedMap { it.owner.toIrBasedDescriptor() }
|
||||
|
||||
@@ -412,12 +429,7 @@ open class IrBasedSimpleFunctionDescriptor(owner: IrSimpleFunction) : SimpleFunc
|
||||
(containingDeclaration as ClassDescriptor).thisAsReceiverParameter
|
||||
}
|
||||
|
||||
override fun getExtensionReceiverParameter() = owner.extensionReceiverParameter?.toIrBasedDescriptor() as? ReceiverParameterDescriptor
|
||||
override fun getTypeParameters() = owner.typeParameters.memoryOptimizedMap { it.toIrBasedDescriptor() }
|
||||
override fun getValueParameters() = owner.valueParameters
|
||||
.asSequence()
|
||||
.mapNotNull { it.toIrBasedDescriptor() as? ValueParameterDescriptor }
|
||||
.toMutableList()
|
||||
|
||||
override fun isExternal() = owner.isExternal
|
||||
override fun isSuspend() = owner.isSuspend
|
||||
@@ -482,7 +494,7 @@ fun IrSimpleFunction.toIrBasedDescriptor() =
|
||||
}
|
||||
|
||||
open class IrBasedClassConstructorDescriptor(owner: IrConstructor) : ClassConstructorDescriptor,
|
||||
IrBasedCallableDescriptor<IrConstructor>(owner) {
|
||||
IrBasedFunctionDescriptor<IrConstructor>(owner) {
|
||||
override fun getContainingDeclaration() = (owner.parent as IrClass).toIrBasedDescriptor()
|
||||
|
||||
override fun getDispatchReceiverParameter() = owner.dispatchReceiverParameter?.run {
|
||||
@@ -492,10 +504,6 @@ open class IrBasedClassConstructorDescriptor(owner: IrConstructor) : ClassConstr
|
||||
override fun getTypeParameters() =
|
||||
(owner.constructedClass.typeParameters + owner.typeParameters).memoryOptimizedMap { it.toIrBasedDescriptor() }
|
||||
|
||||
override fun getValueParameters() = owner.valueParameters.asSequence()
|
||||
.mapNotNull { it.toIrBasedDescriptor() as? ValueParameterDescriptor }
|
||||
.toMutableList()
|
||||
|
||||
override fun getOriginal() = this
|
||||
|
||||
override fun substitute(substitutor: TypeSubstitutor): ClassConstructorDescriptor {
|
||||
|
||||
+1
-5
@@ -78,7 +78,7 @@ open class DescriptorMangleComputer(builder: StringBuilder, mode: MangleMode) :
|
||||
|
||||
contextReceiverParameters.forEach {
|
||||
builder.appendSignature(MangleConstant.CONTEXT_RECEIVER_PREFIX)
|
||||
mangleContextReceiverParameter(builder, it)
|
||||
mangleType(builder, it.type, null)
|
||||
}
|
||||
|
||||
extensionReceiverParameter?.let {
|
||||
@@ -105,10 +105,6 @@ open class DescriptorMangleComputer(builder: StringBuilder, mode: MangleMode) :
|
||||
}
|
||||
}
|
||||
|
||||
private fun mangleContextReceiverParameter(vpBuilder: StringBuilder, param: ReceiverParameterDescriptor) {
|
||||
mangleType(vpBuilder, param.type, null)
|
||||
}
|
||||
|
||||
private fun mangleExtensionReceiverParameter(vpBuilder: StringBuilder, param: ReceiverParameterDescriptor) {
|
||||
mangleType(vpBuilder, param.type, null)
|
||||
}
|
||||
|
||||
+8
-1
@@ -87,6 +87,13 @@ open class IrMangleComputer(
|
||||
builder.appendSignature(it)
|
||||
}
|
||||
|
||||
valueParameters.take(contextReceiverParametersCount).forEach {
|
||||
if (!it.isHidden) {
|
||||
builder.appendSignature(MangleConstant.CONTEXT_RECEIVER_PREFIX)
|
||||
mangleType(builder, it.type, null)
|
||||
}
|
||||
}
|
||||
|
||||
extensionReceiverParameter?.let {
|
||||
if (!it.isHidden) {
|
||||
builder.appendSignature(MangleConstant.EXTENSION_RECEIVER_PREFIX)
|
||||
@@ -94,7 +101,7 @@ open class IrMangleComputer(
|
||||
}
|
||||
}
|
||||
|
||||
valueParameters.collectForMangler(builder, MangleConstant.VALUE_PARAMETERS) {
|
||||
valueParameters.drop(contextReceiverParametersCount).collectForMangler(builder, MangleConstant.VALUE_PARAMETERS) {
|
||||
if (!it.isHidden) {
|
||||
appendSignature(specialValueParamPrefix(it))
|
||||
mangleValueParameter(this, it, null)
|
||||
|
||||
-3
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
data class MyContainer(var i: Int)
|
||||
|
||||
var operationScore = 0
|
||||
|
||||
Vendored
+3
-6
@@ -65,20 +65,17 @@ data class MyContainer {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #get@MyContainer(kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #get!kotlin.Int@MyContainer(kotlin.Int){}kotlin.Int
|
||||
// Mangled name: #get!kotlin.Int@MyContainer(kotlin.Int){}kotlin.Int
|
||||
// Public signature: /get|-3979760669169671321[0]
|
||||
operator fun MyContainer.get($context_receiver_0: Int, index: Int): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #inc@MyContainer(kotlin.Int){}MyContainer
|
||||
// Mangled name computed from Descriptor: #inc!kotlin.Int@MyContainer(){}MyContainer
|
||||
// Mangled name: #inc!kotlin.Int@MyContainer(){}MyContainer
|
||||
// Public signature: /inc|-8228731243470619532[0]
|
||||
operator fun MyContainer.inc($context_receiver_0: Int): MyContainer
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #plusAssign@MyContainer(kotlin.Int;MyContainer){}
|
||||
// Mangled name computed from Descriptor: #plusAssign!kotlin.Int@MyContainer(MyContainer){}
|
||||
// Mangled name: #plusAssign!kotlin.Int@MyContainer(MyContainer){}
|
||||
// Public signature: /plusAssign|677104996565540010[0]
|
||||
operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer): Unit
|
||||
|
||||
|
||||
-3
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
data class MyContainer(var s: String)
|
||||
|
||||
context(Int)
|
||||
|
||||
+2
-4
@@ -52,14 +52,12 @@ data class MyContainer {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #get@MyContainer(kotlin.Int;kotlin.Int){}kotlin.String?
|
||||
// Mangled name computed from Descriptor: #get!kotlin.Int@MyContainer(kotlin.Int){}kotlin.String?
|
||||
// Mangled name: #get!kotlin.Int@MyContainer(kotlin.Int){}kotlin.String?
|
||||
// Public signature: /get|-262764729710480185[0]
|
||||
operator fun MyContainer.get($context_receiver_0: Int, index: Int): String?
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #set@MyContainer(kotlin.Int;kotlin.Int;kotlin.String){}
|
||||
// Mangled name computed from Descriptor: #set!kotlin.Int@MyContainer(kotlin.Int;kotlin.String){}
|
||||
// Mangled name: #set!kotlin.Int@MyContainer(kotlin.Int;kotlin.String){}
|
||||
// Public signature: /set|1694887052182048775[0]
|
||||
operator fun MyContainer.set($context_receiver_0: Int, index: Int, value: String): Unit
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
class Outer {
|
||||
val x: Int = 1
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
// Public signature: /Inner|null[0]
|
||||
class Inner {
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: Inner#<init>(Outer;kotlin.Any){}
|
||||
// Mangled name computed from Descriptor: Inner#<init>!Outer(kotlin.Any){}
|
||||
// Mangled name: Inner#<init>!Outer(kotlin.Any){}
|
||||
// Public signature: /Inner.<init>|7428094623108856579[0]
|
||||
constructor($context_receiver_0: Outer, arg: Any) /* primary */
|
||||
// CHECK:
|
||||
|
||||
-3
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
data class Result(var i: Int)
|
||||
|
||||
var operationScore = 0
|
||||
|
||||
Vendored
+8
-16
@@ -65,50 +65,42 @@ data class Result {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #div@Result(kotlin.Int;Result){}Result
|
||||
// Mangled name computed from Descriptor: #div!kotlin.Int@Result(Result){}Result
|
||||
// Mangled name: #div!kotlin.Int@Result(Result){}Result
|
||||
// Public signature: /div|4720798164978030724[0]
|
||||
operator fun Result.div($context_receiver_0: Int, other: Result): Result
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #divAssign@Result(kotlin.Int;Result){}
|
||||
// Mangled name computed from Descriptor: #divAssign!kotlin.Int@Result(Result){}
|
||||
// Mangled name: #divAssign!kotlin.Int@Result(Result){}
|
||||
// Public signature: /divAssign|2355297718303587055[0]
|
||||
operator fun Result.divAssign($context_receiver_0: Int, other: Result): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #minus@Result(kotlin.Int;Result){}Result
|
||||
// Mangled name computed from Descriptor: #minus!kotlin.Int@Result(Result){}Result
|
||||
// Mangled name: #minus!kotlin.Int@Result(Result){}Result
|
||||
// Public signature: /minus|3968749932240310139[0]
|
||||
operator fun Result.minus($context_receiver_0: Int, other: Result): Result
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #minusAssign@Result(kotlin.Int;Result){}
|
||||
// Mangled name computed from Descriptor: #minusAssign!kotlin.Int@Result(Result){}
|
||||
// Mangled name: #minusAssign!kotlin.Int@Result(Result){}
|
||||
// Public signature: /minusAssign|5475976237961546392[0]
|
||||
operator fun Result.minusAssign($context_receiver_0: Int, other: Result): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #plus@Result(kotlin.Int;Result){}Result
|
||||
// Mangled name computed from Descriptor: #plus!kotlin.Int@Result(Result){}Result
|
||||
// Mangled name: #plus!kotlin.Int@Result(Result){}Result
|
||||
// Public signature: /plus|4903222358721452198[0]
|
||||
operator fun Result.plus($context_receiver_0: Int, other: Result): Result
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #plusAssign@Result(kotlin.Int;Result){}
|
||||
// Mangled name computed from Descriptor: #plusAssign!kotlin.Int@Result(Result){}
|
||||
// Mangled name: #plusAssign!kotlin.Int@Result(Result){}
|
||||
// Public signature: /plusAssign|-1237264614376392652[0]
|
||||
operator fun Result.plusAssign($context_receiver_0: Int, other: Result): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #times@Result(kotlin.Int;Result){}Result
|
||||
// Mangled name computed from Descriptor: #times!kotlin.Int@Result(Result){}Result
|
||||
// Mangled name: #times!kotlin.Int@Result(Result){}Result
|
||||
// Public signature: /times|3621876074874527655[0]
|
||||
operator fun Result.times($context_receiver_0: Int, other: Result): Result
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #timesAssign@Result(kotlin.Int;Result){}
|
||||
// Mangled name computed from Descriptor: #timesAssign!kotlin.Int@Result(Result){}
|
||||
// Mangled name: #timesAssign!kotlin.Int@Result(Result){}
|
||||
// Public signature: /timesAssign|1025810528106719294[0]
|
||||
operator fun Result.timesAssign($context_receiver_0: Int, other: Result): Unit
|
||||
|
||||
|
||||
-5
@@ -1,10 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
class Context {
|
||||
fun foo() = 1
|
||||
|
||||
+11
-3
@@ -10,6 +10,9 @@ class Context {
|
||||
// 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
|
||||
|
||||
}
|
||||
@@ -19,13 +22,15 @@ class Context {
|
||||
// Public signature: /Test|null[0]
|
||||
class Test {
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: Test#<init>(Context){}
|
||||
// Mangled name computed from Descriptor: Test#<init>!Context(){}
|
||||
// Mangled name: Test#<init>!Context(){}
|
||||
// Public signature: /Test.<init>|4848133296495274545[0]
|
||||
constructor($context_receiver_0: Context) /* primary */
|
||||
// CHECK:
|
||||
// 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:
|
||||
@@ -36,6 +41,9 @@ class Test {
|
||||
// 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
|
||||
|
||||
}
|
||||
|
||||
-3
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
class Context {
|
||||
fun c() = 1
|
||||
}
|
||||
|
||||
+5
-10
@@ -40,32 +40,27 @@ class Context {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #testInline(Context){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #testInline!Context(){}kotlin.Int
|
||||
// Mangled name: #testInline!Context(){}kotlin.Int
|
||||
// Public signature: /testInline|2700554304824268037[0]
|
||||
inline fun testInline($context_receiver_0: Context): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #testInlineWithArg(Context;kotlin.Int){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #testInlineWithArg!Context(kotlin.Int){}kotlin.Int
|
||||
// Mangled name: #testInlineWithArg!Context(kotlin.Int){}kotlin.Int
|
||||
// Public signature: /testInlineWithArg|9204994988875814257[0]
|
||||
inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #testInlineWithExtensionAndArg@kotlin.Int(Context;kotlin.Int){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #testInlineWithExtensionAndArg!Context@kotlin.Int(kotlin.Int){}kotlin.Int
|
||||
// Mangled name: #testInlineWithExtensionAndArg!Context@kotlin.Int(kotlin.Int){}kotlin.Int
|
||||
// Public signature: /testInlineWithExtensionAndArg|-7753885706218316674[0]
|
||||
inline fun Int.testInlineWithExtensionAndArg($context_receiver_0: Context, i: Int): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #testInlineWithExtensionAndMultipleArgs@kotlin.Int(Context;kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #testInlineWithExtensionAndMultipleArgs!Context@kotlin.Int(kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Mangled name: #testInlineWithExtensionAndMultipleArgs!Context@kotlin.Int(kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Public signature: /testInlineWithExtensionAndMultipleArgs|6839067967550411636[0]
|
||||
inline fun Int.testInlineWithExtensionAndMultipleArgs($context_receiver_0: Context, i1: Int, i2: Int): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #testInlineWithExtensionAndMultipleContextsAndArgs@kotlin.Int(Context;A;kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #testInlineWithExtensionAndMultipleContextsAndArgs!Context!A@kotlin.Int(kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Mangled name: #testInlineWithExtensionAndMultipleContextsAndArgs!Context!A@kotlin.Int(kotlin.Int;kotlin.Int){}kotlin.Int
|
||||
// Public signature: /testInlineWithExtensionAndMultipleContextsAndArgs|4315160499148454711[0]
|
||||
inline fun Int.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0: Context, $context_receiver_1: A, i1: Int, i2: Int): Int
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
class O(val o: String)
|
||||
|
||||
|
||||
+1
-2
@@ -44,8 +44,7 @@ class OK {
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: OK#<init>(O;kotlin.String){}
|
||||
// Mangled name computed from Descriptor: OK#<init>!O(kotlin.String){}
|
||||
// Mangled name: OK#<init>!O(kotlin.String){}
|
||||
// Public signature: /OK.<init>|-804847331171011326[0]
|
||||
constructor($context_receiver_0: O, k: String) /* primary */
|
||||
// CHECK:
|
||||
|
||||
-3
@@ -2,9 +2,6 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
var operationScore = 0
|
||||
|
||||
Vendored
+3
-6
@@ -34,14 +34,12 @@ class Delegate {
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: Delegate#getValue(kotlin.Int;kotlin.Any?;kotlin.reflect.KProperty<*>){}kotlin.String
|
||||
// Mangled name computed from Descriptor: Delegate#getValue!kotlin.Int(kotlin.Any?;kotlin.reflect.KProperty<*>){}kotlin.String
|
||||
// Mangled name: Delegate#getValue!kotlin.Int(kotlin.Any?;kotlin.reflect.KProperty<*>){}kotlin.String
|
||||
// Public signature: /Delegate.getValue|-7764345795816801347[0]
|
||||
operator fun getValue($context_receiver_0: Int, thisRef: Any?, property: KProperty<*>): String
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: Delegate#setValue(kotlin.Int;kotlin.Any?;kotlin.reflect.KProperty<*>;kotlin.String){}
|
||||
// Mangled name computed from Descriptor: Delegate#setValue!kotlin.Int(kotlin.Any?;kotlin.reflect.KProperty<*>;kotlin.String){}
|
||||
// Mangled name: Delegate#setValue!kotlin.Int(kotlin.Any?;kotlin.reflect.KProperty<*>;kotlin.String){}
|
||||
// Public signature: /Delegate.setValue|9105212648373628088[0]
|
||||
operator fun setValue($context_receiver_0: Int, thisRef: Any?, property: KProperty<*>, value: String): Unit
|
||||
|
||||
@@ -65,8 +63,7 @@ class Result {
|
||||
set(<set-?>: String): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: Result#<init>(kotlin.Int){}
|
||||
// Mangled name computed from Descriptor: Result#<init>!kotlin.Int(){}
|
||||
// Mangled name: Result#<init>!kotlin.Int(){}
|
||||
// Public signature: /Result.<init>|-1392650824251324893[0]
|
||||
constructor($context_receiver_0: Int) /* primary */
|
||||
// CHECK:
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
interface Canvas {
|
||||
val suffix: String
|
||||
}
|
||||
|
||||
+2
-4
@@ -8,8 +8,7 @@ class Circle : Shape {
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: Circle#draw(Canvas){}kotlin.String
|
||||
// Mangled name computed from Descriptor: Circle#draw!Canvas(){}kotlin.String
|
||||
// Mangled name: Circle#draw!Canvas(){}kotlin.String
|
||||
// Public signature: /Circle.draw|-6733499063990640842[0]
|
||||
override fun draw($context_receiver_0: Canvas): String
|
||||
|
||||
@@ -37,8 +36,7 @@ interface Canvas {
|
||||
interface Shape {
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: Shape#draw(Canvas){}kotlin.String
|
||||
// Mangled name computed from Descriptor: Shape#draw!Canvas(){}kotlin.String
|
||||
// Mangled name: Shape#draw!Canvas(){}kotlin.String
|
||||
// Public signature: /Shape.draw|-6733499063990640842[0]
|
||||
abstract fun draw($context_receiver_0: Canvas): String
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57429, KT-57435
|
||||
// ^ KT-57429
|
||||
|
||||
data class Pair<A, B>(val first: A, val second: B)
|
||||
|
||||
|
||||
+2
-4
@@ -62,8 +62,7 @@ data class Pair<A : Any?, B : Any?> {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #compareTo@0:0(java.util.Comparator<0:0>;0:0){0§<kotlin.Any?>}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #compareTo!java.util.Comparator<0:0>@0:0(0:0){0§<kotlin.Any?>}kotlin.Int
|
||||
// Mangled name: #compareTo!java.util.Comparator<0:0>@0:0(0:0){0§<kotlin.Any?>}kotlin.Int
|
||||
// Public signature: /compareTo|-4091974102091923679[0]
|
||||
infix operator fun <T : Any?> T.compareTo($context_receiver_0: Comparator<T>, other: T): Int
|
||||
|
||||
@@ -72,8 +71,7 @@ infix operator fun <T : Any?> T.compareTo($context_receiver_0: Comparator<T>, ot
|
||||
// Public signature: /min|6885845668930107919[0]
|
||||
val <T : Any?> Pair<T, T>.min: T
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #<get-min>@Pair<0:0,0:0>(java.util.Comparator<0:0>){0§<kotlin.Any?>}0:0
|
||||
// Mangled name computed from Descriptor: #<get-min>!java.util.Comparator<0:0>@Pair<0:0,0:0>(){0§<kotlin.Any?>}0:0
|
||||
// Mangled name: #<get-min>!java.util.Comparator<0:0>@Pair<0:0,0:0>(){0§<kotlin.Any?>}0:0
|
||||
// Public signature: /min.<get-min>|6404877126791863503[0]
|
||||
get($context_receiver_0: Comparator<T>): T
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
class View {
|
||||
val coefficient = 42
|
||||
}
|
||||
|
||||
+1
-2
@@ -28,8 +28,7 @@ fun box(): String
|
||||
// Public signature: /dp|-4245635280375224248[0]
|
||||
val Int.dp: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #<get-dp>@kotlin.Int(View){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #<get-dp>!View@kotlin.Int(){}kotlin.Int
|
||||
// Mangled name: #<get-dp>!View@kotlin.Int(){}kotlin.Int
|
||||
// Public signature: /dp.<get-dp>|933397372434095199[0]
|
||||
get($context_receiver_0: View): Int
|
||||
|
||||
|
||||
-3
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
class Param
|
||||
class O {
|
||||
val o = "O"
|
||||
|
||||
Vendored
+1
-2
@@ -55,8 +55,7 @@ class Param {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #f@K(O;kotlin.Function3<O,K,Param,0:0>){0§<kotlin.Any?>}0:0
|
||||
// Mangled name computed from Descriptor: #f!O@K(kotlin.Function3<O,K,Param,0:0>){0§<kotlin.Any?>}0:0
|
||||
// Mangled name: #f!O@K(kotlin.Function3<O,K,Param,0:0>){0§<kotlin.Any?>}0:0
|
||||
// Public signature: /f|-7653040485655702379[0]
|
||||
fun <T : Any?> K.f($context_receiver_0: O, g: @ExtensionFunctionType Function3<O, K, Param, T>): T
|
||||
|
||||
|
||||
-4
@@ -1,10 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
interface Semigroup<T> {
|
||||
infix fun T.combine(other: T): T
|
||||
}
|
||||
|
||||
+1
-2
@@ -86,8 +86,7 @@ object StringMonoid : Monoid<String> {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #sum@kotlin.collections.List<0:0>(Monoid<0:0>){0§<kotlin.Any?>}0:0
|
||||
// Mangled name computed from Descriptor: #sum!Monoid<0:0>@kotlin.collections.List<0:0>(){0§<kotlin.Any?>}0:0
|
||||
// Mangled name: #sum!Monoid<0:0>@kotlin.collections.List<0:0>(){0§<kotlin.Any?>}0:0
|
||||
// Public signature: /sum|7635142307973834922[0]
|
||||
fun <T : Any?> List<T>.sum($context_receiver_0: Monoid<T>): T
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
class C {
|
||||
val c = 42
|
||||
|
||||
+1
-2
@@ -28,8 +28,7 @@ fun bar(c: C): Unit
|
||||
local fun C.<anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #foo(C){}
|
||||
// Mangled name computed from Descriptor: #foo!C(){}
|
||||
// Mangled name: #foo!C(){}
|
||||
// Public signature: /foo|-1491377105373055541[0]
|
||||
fun foo($context_receiver_0: C): Unit
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
class Param
|
||||
class C {
|
||||
val c = 42
|
||||
|
||||
+4
-8
@@ -50,26 +50,22 @@ class R {
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #f1@R(C;kotlin.Function3<C,R,Param,kotlin.Unit>){}
|
||||
// Mangled name computed from Descriptor: #f1!C@R(kotlin.Function3<C,R,Param,kotlin.Unit>){}
|
||||
// Mangled name: #f1!C@R(kotlin.Function3<C,R,Param,kotlin.Unit>){}
|
||||
// Public signature: /f1|-6159499595952586733[0]
|
||||
fun R.f1($context_receiver_0: C, g: @ExtensionFunctionType Function3<C, R, Param, Unit>): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #f2(C;kotlin.Function2<C,Param,kotlin.Unit>){}
|
||||
// Mangled name computed from Descriptor: #f2!C(kotlin.Function2<C,Param,kotlin.Unit>){}
|
||||
// Mangled name: #f2!C(kotlin.Function2<C,Param,kotlin.Unit>){}
|
||||
// Public signature: /f2|916795325728250836[0]
|
||||
fun f2($context_receiver_0: C, g: Function2<C, Param, Unit>): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #f3@R(C;kotlin.Function2<C,R,kotlin.Unit>){}
|
||||
// Mangled name computed from Descriptor: #f3!C@R(kotlin.Function2<C,R,kotlin.Unit>){}
|
||||
// Mangled name: #f3!C@R(kotlin.Function2<C,R,kotlin.Unit>){}
|
||||
// Public signature: /f3|-4964362597990757320[0]
|
||||
fun R.f3($context_receiver_0: C, g: @ExtensionFunctionType Function2<C, R, Unit>): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #f4(C;kotlin.Function1<C,kotlin.Unit>){}
|
||||
// Mangled name computed from Descriptor: #f4!C(kotlin.Function1<C,kotlin.Unit>){}
|
||||
// Mangled name: #f4!C(kotlin.Function1<C,kotlin.Unit>){}
|
||||
// Public signature: /f4|-1495265522536685659[0]
|
||||
fun f4($context_receiver_0: C, g: Function1<C, Unit>): Unit
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57429, KT-57435
|
||||
// ^ KT-57429
|
||||
|
||||
|
||||
context(T) class A<T>
|
||||
|
||||
+2
-4
@@ -3,8 +3,7 @@
|
||||
// Public signature: /A|null[0]
|
||||
class A<T : Any?> {
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: A#<init>(1:0){}
|
||||
// Mangled name computed from Descriptor: A#<init>!1:0(){}
|
||||
// Mangled name: A#<init>!1:0(){}
|
||||
// Public signature: /A.<init>|5547349096232763669[0]
|
||||
constructor($context_receiver_0: T) /* primary */
|
||||
// CHECK:
|
||||
@@ -19,8 +18,7 @@ class A<T : Any?> {
|
||||
// Public signature: /B|null[0]
|
||||
class B<P : Any?> {
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: B#<init>(kotlin.collections.Collection<1:0>){}
|
||||
// Mangled name computed from Descriptor: B#<init>!kotlin.collections.Collection<1:0>(){}
|
||||
// Mangled name: B#<init>!kotlin.collections.Collection<1:0>(){}
|
||||
// Public signature: /B.<init>|-5453957848603821578[0]
|
||||
constructor($context_receiver_0: Collection<P>) /* primary */
|
||||
// CHECK:
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// WITH_STDLIB
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
data class Counter(var i: Int = 0)
|
||||
|
||||
data class CounterConfig(val max: Int = 10)
|
||||
|
||||
+2
-4
@@ -104,8 +104,7 @@ class CounterIterator : Iterator<Int> {
|
||||
private get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: CounterIterator#<init>(CounterConfig;Counter){}
|
||||
// Mangled name computed from Descriptor: CounterIterator#<init>!CounterConfig(Counter){}
|
||||
// Mangled name: CounterIterator#<init>!CounterConfig(Counter){}
|
||||
// Public signature: /CounterIterator.<init>|4731448293962665986[0]
|
||||
constructor($context_receiver_0: CounterConfig, counter: Counter) /* primary */
|
||||
// CHECK:
|
||||
@@ -131,8 +130,7 @@ class CounterIterator : Iterator<Int> {
|
||||
fun box(): String
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #iterator@Counter(CounterConfig){}CounterIterator
|
||||
// Mangled name computed from Descriptor: #iterator!CounterConfig@Counter(){}CounterIterator
|
||||
// Mangled name: #iterator!CounterConfig@Counter(){}CounterIterator
|
||||
// Public signature: /iterator|3723033021471264185[0]
|
||||
operator fun Counter.iterator($context_receiver_0: CounterConfig): CounterIterator
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// FIR_IDENTICAL
|
||||
// IGNORE_BACKEND_K1: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
context(Unit, Int)
|
||||
class MyClass
|
||||
|
||||
+9
-4
@@ -3,17 +3,22 @@
|
||||
// Public signature: /MyClass|null[0]
|
||||
class MyClass {
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: MyClass#<init>(kotlin.Unit;kotlin.Int){}
|
||||
// Mangled name computed from Descriptor: MyClass#<init>!kotlin.Unit!kotlin.Int(){}
|
||||
// Mangled name: MyClass#<init>!kotlin.Unit!kotlin.Int(){}
|
||||
// Public signature: /MyClass.<init>|1062323742830185042[0]
|
||||
constructor($context_receiver_0: Unit, $context_receiver_1: Int) /* primary */
|
||||
// CHECK:
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: MyClass.contextReceiverField0
|
||||
// Mangled name computed from Descriptor: MyClass{}contextReceiverField0#jf
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name computed from Ir: MyClass.contextReceiverField0
|
||||
// Mangled name computed from Descriptor: MyClass{}contextReceiverField0
|
||||
private /* final field */ val contextReceiverField0: Unit
|
||||
// CHECK:
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: MyClass.contextReceiverField1
|
||||
// Mangled name computed from Descriptor: MyClass{}contextReceiverField1#jf
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name computed from Ir: MyClass.contextReceiverField1
|
||||
// Mangled name computed from Descriptor: MyClass{}contextReceiverField1
|
||||
private /* final field */ val contextReceiverField1: Int
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
interface Lazy<T>
|
||||
|
||||
|
||||
@@ -45,20 +45,17 @@ fun <T : Any?> f(lazy1: Lazy<Int>, lazy2: Lazy<CharSequence>, lazyT: Lazy<T>, la
|
||||
local fun Lazy<Lazy<T>>.<anonymous>(): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #test1(Lazy<kotlin.Int>;Lazy<kotlin.CharSequence>){}
|
||||
// Mangled name computed from Descriptor: #test1!Lazy<kotlin.Int>!Lazy<kotlin.CharSequence>(){}
|
||||
// Mangled name: #test1!Lazy<kotlin.Int>!Lazy<kotlin.CharSequence>(){}
|
||||
// Public signature: /test1|5140438532469983470[0]
|
||||
fun test1($context_receiver_0: Lazy<Int>, $context_receiver_1: Lazy<CharSequence>): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #test2@Lazy<kotlin.Int>(Lazy<0:0>){0§<kotlin.Any?>}
|
||||
// Mangled name computed from Descriptor: #test2!Lazy<0:0>@Lazy<kotlin.Int>(){0§<kotlin.Any?>}
|
||||
// Mangled name: #test2!Lazy<0:0>@Lazy<kotlin.Int>(){0§<kotlin.Any?>}
|
||||
// Public signature: /test2|-2502875315769862011[0]
|
||||
fun <T : Any?> Lazy<Int>.test2($context_receiver_0: Lazy<T>): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #test3@Lazy<kotlin.Int>(Lazy<Lazy<0:0>>){0§<kotlin.Any?>}
|
||||
// Mangled name computed from Descriptor: #test3!Lazy<Lazy<0:0>>@Lazy<kotlin.Int>(){0§<kotlin.Any?>}
|
||||
// Mangled name: #test3!Lazy<Lazy<0:0>>@Lazy<kotlin.Int>(){0§<kotlin.Any?>}
|
||||
// Public signature: /test3|-745136432920564509[0]
|
||||
fun <T : Any?> Lazy<Int>.test3($context_receiver_0: Lazy<Lazy<T>>): Unit
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
class Context
|
||||
|
||||
|
||||
+1
-2
@@ -10,8 +10,7 @@ class Context {
|
||||
}
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #f(Context){}kotlin.String
|
||||
// Mangled name computed from Descriptor: #f!Context(){}kotlin.String
|
||||
// Mangled name: #f!Context(){}kotlin.String
|
||||
// Public signature: /f|-5175802051654911360[0]
|
||||
fun f($context_receiver_0: Context): String
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
context(Int, String)
|
||||
fun foo(): Int {
|
||||
|
||||
+2
-4
@@ -1,12 +1,10 @@
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #foo(kotlin.Int){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #foo!kotlin.Int(){}kotlin.Int
|
||||
// Mangled name: #foo!kotlin.Int(){}kotlin.Int
|
||||
// Public signature: /foo|-298514072419997277[0]
|
||||
fun foo($context_receiver_0: Int): Int
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #foo(kotlin.Int;kotlin.String){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #foo!kotlin.Int!kotlin.String(){}kotlin.Int
|
||||
// Mangled name: #foo!kotlin.Int!kotlin.String(){}kotlin.Int
|
||||
// Public signature: /foo|7076979931255393427[0]
|
||||
fun foo($context_receiver_0: Int, $context_receiver_1: String): Int
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
interface NumberOperations {
|
||||
fun Number.plus(other: Number): Number
|
||||
}
|
||||
|
||||
+1
-2
@@ -22,8 +22,7 @@ interface NumberOperations {
|
||||
}
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #plus@Matrix(NumberOperations;Matrix){}Matrix
|
||||
// Mangled name computed from Descriptor: #plus!NumberOperations@Matrix(Matrix){}Matrix
|
||||
// Mangled name: #plus!NumberOperations@Matrix(Matrix){}Matrix
|
||||
// Public signature: /plus|1303343764214809933[0]
|
||||
fun Matrix.plus($context_receiver_0: NumberOperations, other: Matrix): Matrix
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: JS_IR
|
||||
// ^ KT-57818
|
||||
|
||||
interface A {
|
||||
fun a(): Int
|
||||
|
||||
+2
-4
@@ -33,12 +33,10 @@ interface B {
|
||||
// Public signature: /c|-4416962153448040627[0]
|
||||
val c: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #<get-c>(A;B){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #<get-c>!A!B(){}kotlin.Int
|
||||
// Mangled name: #<get-c>!A!B(){}kotlin.Int
|
||||
// Public signature: /c.<get-c>|-2082007887378586898[0]
|
||||
// CHECK JS_IR NATIVE:
|
||||
// Mangled name computed from Ir: #<get-c>(A;B){}
|
||||
// Mangled name computed from Descriptor: #<get-c>!A!B(){}
|
||||
// Mangled name: #<get-c>!A!B(){}
|
||||
// Public signature: /c.<get-c>|2760865531401172403[0]
|
||||
get($context_receiver_0: A, $context_receiver_1: B): Int
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// IGNORE_BACKEND_K1: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57429, KT-57435
|
||||
// ^ KT-57429
|
||||
|
||||
class A<T>(val a: T)
|
||||
class B(val b: Any)
|
||||
|
||||
+2
-4
@@ -59,8 +59,7 @@ class C {
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #f(A<kotlin.Int>;A<kotlin.String>;B){}
|
||||
// Mangled name computed from Descriptor: #f!A<kotlin.Int>!A<kotlin.String>!B(){}
|
||||
// Mangled name: #f!A<kotlin.Int>!A<kotlin.String>!B(){}
|
||||
// Public signature: /f|-2471136927765483161[0]
|
||||
fun f($context_receiver_0: A<Int>, $context_receiver_1: A<String>, $context_receiver_2: B): Unit
|
||||
|
||||
@@ -69,8 +68,7 @@ fun f($context_receiver_0: A<Int>, $context_receiver_1: A<String>, $context_rece
|
||||
// Public signature: /p|-5429013048289439414[0]
|
||||
val C.p: Int
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name computed from Ir: #<get-p>@C(A<kotlin.Int>;A<kotlin.String>;B){}kotlin.Int
|
||||
// Mangled name computed from Descriptor: #<get-p>!A<kotlin.Int>!A<kotlin.String>!B@C(){}kotlin.Int
|
||||
// Mangled name: #<get-p>!A<kotlin.Int>!A<kotlin.String>!B@C(){}kotlin.Int
|
||||
// Public signature: /p.<get-p>|-7725362510645392909[0]
|
||||
get($context_receiver_0: A<Int>, $context_receiver_1: A<String>, $context_receiver_2: B): Int
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57428, KT-57435
|
||||
// ^ KT-57428
|
||||
|
||||
context(T)
|
||||
fun <T> useContext(block: (T) -> Unit) { }
|
||||
|
||||
Vendored
+1
-2
@@ -10,8 +10,7 @@ fun test(): Unit
|
||||
local fun <anonymous>(i: Int): Unit
|
||||
|
||||
// CHECK:
|
||||
// Mangled name computed from Ir: #useContext(0:0;kotlin.Function1<0:0,kotlin.Unit>){0§<kotlin.Any?>}
|
||||
// Mangled name computed from Descriptor: #useContext!0:0(kotlin.Function1<0:0,kotlin.Unit>){0§<kotlin.Any?>}
|
||||
// Mangled name: #useContext!0:0(kotlin.Function1<0:0,kotlin.Unit>){0§<kotlin.Any?>}
|
||||
// Public signature: /useContext|4354708628570086942[0]
|
||||
fun <T : Any?> useContext($context_receiver_0: T, block: Function1<T, Unit>): Unit
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
// MUTE_SIGNATURE_COMPARISON_K2: ANY
|
||||
// ^ KT-57435
|
||||
|
||||
data class Result(val i: Int)
|
||||
|
||||
var operationScore = 0
|
||||
|
||||
+4
-8
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user