diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt index 5206f69492a..1f2985e33bb 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt @@ -267,6 +267,7 @@ class ExpressionsConverter( } explicitReceiver = leftArgAsFir argumentList = buildUnaryArgumentList(rightArgAsFir) + origin = if (conventionCallName != null) FirFunctionCallOrigin.OPERATOR else FirFunctionCallOrigin.INFIX } } else { val firOperation = operationToken.toFirOperation() diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos/2.17.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos/2.17.fir.kt index 50e6e9a114b..5a3bc44c651 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos/2.17.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/call-with-trailing-lambda-expressions/p-1/pos/2.17.fir.kt @@ -95,17 +95,17 @@ class A() { fun bar(a: A) { //todo: add info if function is infix one - a foo {1} + a foo {1} } fun buz(a: A) { fun foo(i: ()->Int) {} //todo: add info if function is infix one - a foo {1} + a foo {1} } fun boo(a: A) { infix fun A.foo(i: ()->Int) {} - a foo {1} + a foo {1} } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.1.fir.kt index 2db48105ceb..7b808b81028 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.1.fir.kt @@ -28,8 +28,8 @@ class Case1() { fun case1() { val a = A() - a foo 1 - A() foo 1 + a foo 1 + A() foo 1 } } // FILE: TestCase2.kt @@ -43,8 +43,8 @@ interface Case2 { fun case2() { val a = A() - a foo 1 - A() foo 1 + a foo 1 + A() foo 1 } } @@ -60,8 +60,8 @@ fun case3() { fun A.foo(x: Int) ="my local scope contains" val a = A() - a foo 1 - A() foo 1 + a foo 1 + A() foo 1 } // FILE: TestCase4.kt @@ -79,7 +79,7 @@ fun case4() { fun subfun() { fun A.foo(x: Int) = "my local contains" val a = A() - a foo 1 - A() foo 1 + a foo 1 + A() foo 1 } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.2.fir.kt index 091876b7dc3..89614af245d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.2.fir.kt @@ -32,7 +32,7 @@ class Case1() { fun case1() { val regex = Regex("") - "" contains regex + "" contains regex } } // FILE: TestCase2.kt @@ -49,7 +49,7 @@ interface Case2 { fun case2() { val regex = Regex("") - "" contains regex + "" contains regex } } @@ -70,7 +70,7 @@ fun case3() { } val regex = Regex("") - "" contains regex + "" contains regex } // FILE: TestCase4.kt @@ -98,7 +98,7 @@ fun case4() { } val regex = Regex("") - "" contains regex + "" contains regex } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.3.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.3.fir.kt index 53efae4a21c..05a36a21622 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.3.fir.kt @@ -27,7 +27,7 @@ import libPackage.contains fun case1() { val regex = Regex("") - "" contains regex + "" contains regex } // FILE: TestCase2.kt @@ -44,5 +44,6 @@ fun case2() { } val regex = Regex("") - "" contains regex + "" contains regex } + diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.4.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.4.fir.kt index 6f9e36c7b56..0c2db1cd175 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.4.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/1.4.fir.kt @@ -27,7 +27,7 @@ import libPackage.* fun case1() { val regex = Regex("") - "" contains regex + "" contains regex } // FILE: TestCase2.kt @@ -42,5 +42,5 @@ import libPackage.* fun case2() { val regex = Regex("") - "" contains regex + "" contains regex } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/4.5.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/4.5.fir.kt index aff935d8a7f..39608866ff9 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/4.5.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/neg/4.5.fir.kt @@ -17,5 +17,5 @@ import libPackage.* //nothing to import, extension is private // TESTCASE NUMBER: 1 fun case1() { val regex = Regex("") - "" contains regex + "" contains regex } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos/4.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos/4.1.fir.kt index 655c5b7cd1b..84b861afaa5 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos/4.1.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/infix-function-call/p-2/pos/4.1.fir.kt @@ -94,17 +94,17 @@ class A() { fun bar(a: A) { //todo: add info if function is infix one - a foo 1 + a foo 1 } fun buz(a: A){ fun foo(i: Int) {} //todo: add info if function is infix one - a foo 1 + a foo 1 } fun boo(a: A){ infix fun A.foo(i: Int) {} - a foo 1 + a foo 1 } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.3.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.3.fir.kt index 2c81293510a..6bfb0d8bf7b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.3.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.3.fir.kt @@ -55,9 +55,9 @@ class Case() { /*operator*/ fun E.plus(value: Int) = Case() run { - e + 1 + e + 1 } - e + 1 + e + 1 } } @@ -105,9 +105,9 @@ class Case() { run { /*operator*/ fun E.plus(value: Int) = Case() - e + 1 + e + 1 } - e + 1 + e + 1 } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.4.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.4.fir.kt index 2fd586d2d0f..f0fe20740d3 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.4.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.4.fir.kt @@ -46,9 +46,9 @@ class Case() { /*operator*/ fun E.plus(value: Int) = Case() run { - e + 1 + e + 1 } - e + 1 + e + 1 } } @@ -97,9 +97,9 @@ class Case() { run { /*operator*/ fun E.plus(value: Int) = Case() - e + 1 + e + 1 } - e + 1 + e + 1 } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.5.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.5.fir.kt index e2a605db535..95e9ea5f1e4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.5.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-2/pos/3.5.fir.kt @@ -43,9 +43,9 @@ class Case() { /*operator*/ fun E.plus(value: Int) = Case() run { - e + 1 + e + 1 } - e + 1 + e + 1 } }