[FIR] Disallow operators not on functions

Introduce `NOT_FUNCTION_AS_OPERATOR` and use it instead of `PROPERTY_AS_OPERATOR`

^KT-65881 Fixed

Merge-request: KT-MR-14547
This commit is contained in:
Ivan Kochurkin
2024-03-08 10:07:23 +00:00
committed by Space Team
parent df9d59851d
commit 2d4f4b9bb5
31 changed files with 440 additions and 100 deletions
@@ -1023,6 +1023,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/OperatorChecks.kt");
}
@Test
@TestMetadata("OperatorConventions.kt")
public void testOperatorConventions() {
runTest("compiler/testData/diagnostics/tests/OperatorConventions.kt");
}
@Test
@TestMetadata("Operators.kt")
public void testOperators() {
@@ -1023,6 +1023,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/OperatorChecks.kt");
}
@Test
@TestMetadata("OperatorConventions.kt")
public void testOperatorConventions() {
runTest("compiler/testData/diagnostics/tests/OperatorConventions.kt");
}
@Test
@TestMetadata("Operators.kt")
public void testOperators() {