diff --git a/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.txt b/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.txt index 93cf5fc8967..615f08527c7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.txt +++ b/compiler/fir/analysis-tests/testData/resolve/propertyFromJavaPlusAssign.txt @@ -1,4 +1,4 @@ FILE: main.kt public final fun test(b: R|B|): R|kotlin/Unit| { - R|/B.text| = R|/b|.R|/B.text|.R|kotlin/String.plus|(String()) + R|/b|.R|/B.text| = R|/b|.R|/B.text|.R|kotlin/String.plus|(String()) } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt index 22fb36f1921..f0f4018ee82 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt @@ -290,6 +290,10 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) : source = operatorCall.argument.source diagnostic = ConeVariableExpectedError() } + (leftArgument as? FirQualifiedAccess)?.let { + dispatchReceiver = it.dispatchReceiver + extensionReceiver = it.extensionReceiver + } } assignment.transform(transformer, ResolutionMode.ContextIndependent) } diff --git a/compiler/testData/codegen/box/controlStructures/kt8148.kt b/compiler/testData/codegen/box/controlStructures/kt8148.kt index f780007427c..e644af5aeb6 100644 --- a/compiler/testData/codegen/box/controlStructures/kt8148.kt +++ b/compiler/testData/codegen/box/controlStructures/kt8148.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/kt8148_break.kt b/compiler/testData/codegen/box/controlStructures/kt8148_break.kt index 81c6c972e2f..348c38a7fde 100644 --- a/compiler/testData/codegen/box/controlStructures/kt8148_break.kt +++ b/compiler/testData/codegen/box/controlStructures/kt8148_break.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt b/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt index d10b8f03602..dab64b8462b 100644 --- a/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt +++ b/compiler/testData/codegen/box/controlStructures/kt8148_continue.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A(var value: String) fun box(): String { diff --git a/compiler/testData/codegen/box/dataClasses/twoVarParams.kt b/compiler/testData/codegen/box/dataClasses/twoVarParams.kt index a4de991bd80..053cfe55892 100644 --- a/compiler/testData/codegen/box/dataClasses/twoVarParams.kt +++ b/compiler/testData/codegen/box/dataClasses/twoVarParams.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR data class A(var x: Int, var y: String) fun box(): String { diff --git a/compiler/testData/codegen/box/extensionProperties/kt9897.kt b/compiler/testData/codegen/box/extensionProperties/kt9897.kt index 4daff357e68..728323b1c64 100644 --- a/compiler/testData/codegen/box/extensionProperties/kt9897.kt +++ b/compiler/testData/codegen/box/extensionProperties/kt9897.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR object Test { var z = "0" var l = 0L diff --git a/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt b/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt index b5ea632eb5c..9ff0dd42c22 100644 --- a/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt +++ b/compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var z = "0" var l = 0L diff --git a/compiler/testData/codegen/box/finally/finallyAndFinally.kt b/compiler/testData/codegen/box/finally/finallyAndFinally.kt index c8b0b9a8f07..e902bc8746f 100644 --- a/compiler/testData/codegen/box/finally/finallyAndFinally.kt +++ b/compiler/testData/codegen/box/finally/finallyAndFinally.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class MyString { var s = "" operator fun plus(x : String) : MyString { diff --git a/compiler/testData/codegen/box/finally/kt3894.kt b/compiler/testData/codegen/box/finally/kt3894.kt index 9dd2cd9f1d3..83930d88fbd 100644 --- a/compiler/testData/codegen/box/finally/kt3894.kt +++ b/compiler/testData/codegen/box/finally/kt3894.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class MyString { var s = "" operator fun plus(x : String) : MyString { diff --git a/compiler/testData/codegen/box/finally/loopAndFinally.kt b/compiler/testData/codegen/box/finally/loopAndFinally.kt index 6d1a037294c..88425e55ac0 100644 --- a/compiler/testData/codegen/box/finally/loopAndFinally.kt +++ b/compiler/testData/codegen/box/finally/loopAndFinally.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //KT-3869 Loops and finally: outer finally block not run class MyString { diff --git a/compiler/testData/codegen/box/finally/tryLoopTry.kt b/compiler/testData/codegen/box/finally/tryLoopTry.kt index afe487b279e..0a969975070 100644 --- a/compiler/testData/codegen/box/finally/tryLoopTry.kt +++ b/compiler/testData/codegen/box/finally/tryLoopTry.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR //test for appropriate class MyString { diff --git a/compiler/testData/codegen/box/functions/localFunctions/kt4784.kt b/compiler/testData/codegen/box/functions/localFunctions/kt4784.kt index d179f8a9841..404fce279be 100644 --- a/compiler/testData/codegen/box/functions/localFunctions/kt4784.kt +++ b/compiler/testData/codegen/box/functions/localFunctions/kt4784.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class T(var value: Int) {} fun plusAssign(): T { diff --git a/compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt b/compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt index 996035bdd86..709b1c9ac1e 100644 --- a/compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt +++ b/compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class T(var value: Int) {} fun localExtensionOnNullableParameter(): T { diff --git a/compiler/testData/codegen/box/jvmStatic/kt9897_static.kt b/compiler/testData/codegen/box/jvmStatic/kt9897_static.kt index fbbd28399df..94b9d76ce34 100644 --- a/compiler/testData/codegen/box/jvmStatic/kt9897_static.kt +++ b/compiler/testData/codegen/box/jvmStatic/kt9897_static.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/nonLocalReturns/use.kt b/compiler/testData/codegen/box/nonLocalReturns/use.kt index e6805b8431b..4c48dd8b39f 100644 --- a/compiler/testData/codegen/box/nonLocalReturns/use.kt +++ b/compiler/testData/codegen/box/nonLocalReturns/use.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/nonLocalReturns/useWithException.kt b/compiler/testData/codegen/box/nonLocalReturns/useWithException.kt index 5d4ba7389d0..5dc707cdfea 100644 --- a/compiler/testData/codegen/box/nonLocalReturns/useWithException.kt +++ b/compiler/testData/codegen/box/nonLocalReturns/useWithException.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/objectIntrinsics/objects.kt b/compiler/testData/codegen/box/objectIntrinsics/objects.kt index 17f019b75a4..3eddefd5794 100644 --- a/compiler/testData/codegen/box/objectIntrinsics/objects.kt +++ b/compiler/testData/codegen/box/objectIntrinsics/objects.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR package foo fun box(): String { diff --git a/compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt b/compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt index 183d49d77e3..b58ec446156 100644 --- a/compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt +++ b/compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var log = "" class A(p: String) { diff --git a/compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt b/compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt index 30523a13c5c..bc00799ec27 100644 --- a/compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt +++ b/compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var log = "" class A(p: String) { diff --git a/compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt b/compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt index 1a6129a251f..27e7e622c5d 100644 --- a/compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt +++ b/compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A() { var x = 0 } diff --git a/compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt b/compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt index 43a79f08df8..79896e8ba01 100644 --- a/compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt +++ b/compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt @@ -1,5 +1,4 @@ // !LANGUAGE: -ProhibitOperatorMod -// IGNORE_BACKEND_FIR: JVM_IR class A() { var x = 5 diff --git a/compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt b/compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt index 0f14cac28a7..e5371fcc603 100644 --- a/compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt +++ b/compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt @@ -1,5 +1,4 @@ // !LANGUAGE: -ProhibitOperatorMod -// IGNORE_BACKEND_FIR: JVM_IR class A() { var x = 5 diff --git a/compiler/testData/codegen/box/package/incrementProperty.kt b/compiler/testData/codegen/box/package/incrementProperty.kt index 11cdbf4877f..07f0a112195 100644 --- a/compiler/testData/codegen/box/package/incrementProperty.kt +++ b/compiler/testData/codegen/box/package/incrementProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Slot() { var vitality: Int = 10000 diff --git a/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt b/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt index 927bb59aa64..bde3c09d5c4 100644 --- a/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt +++ b/compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // Enable when KT-14833 is fixed. // IGNORE_BACKEND: JVM import kotlin.reflect.KProperty diff --git a/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt b/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt index 7a8ab9c2f88..862ed7e242c 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var sideEffects: String = "" class A { diff --git a/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt b/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt index 0de0b7c8f99..23f796276c0 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR internal var sideEffects: String = "" internal class A { diff --git a/compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt b/compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt index 82331bf6bed..6195900e1d8 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var sideEffects: String = "" class A() { diff --git a/compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt b/compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt index 93d0c7ac89f..7225bc1af4f 100644 --- a/compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt +++ b/compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR var sideEffects: String = "" abstract class B protected constructor(val arg: Int) { diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt index 6966f2db6d8..eca8b7ab977 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt @@ -219,6 +219,7 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt VALUE_PARAMETER name:b index:0 type:.B BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .B' type=kotlin.Unit origin=EQ + $this: GET_VAR ': .B declared in .Host.plusAssign' type=.B origin=null : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.Int declared in .B' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .B declared in .Host.plusAssign' type=.B origin=null diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.txt index 1263f562cd7..29f3668ba25 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropertyAccess.fir.txt @@ -17,6 +17,7 @@ FILE fqName: fileName:/javaSyntheticGenericPropertyAccess.kt $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null CALL 'public open fun (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ + $this: GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public open fun (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt index 64f79841b02..4141f16f2a3 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt @@ -16,6 +16,7 @@ FILE fqName: fileName:/javaSyntheticPropertyAccess.kt $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null CALL 'public open fun (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ + $this: GET_VAR 'j: .J declared in .test' type=.J origin=null x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public open fun (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'j: .J declared in .test' type=.J origin=null diff --git a/compiler/testData/ir/irText/expressions/kt16904.fir.txt b/compiler/testData/ir/irText/expressions/kt16904.fir.txt index 1374fca74ff..84f78cf7986 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.fir.txt @@ -82,6 +82,7 @@ FILE fqName: fileName:/kt16904.kt $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null x: CONST Int type=kotlin.Int value=42 CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .A' type=kotlin.Unit origin=EQ + $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.Int declared in .A' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null