[FIR] Implement deprecation for accessing private operators from public inline function

This only affects delegation operators as well as the for-loop-related
next and hasNext operators.
All the other operators worked correctly before.
In K2, the previously mentioned operator calls will be flagged with a
deprecation error and will become and error in 2.1.

#KT-59782 Fixed
This commit is contained in:
Kirill Rakhman
2024-02-02 14:23:10 +01:00
committed by Space Team
parent 58c03e021b
commit 376a9b8ace
17 changed files with 370 additions and 1 deletions
@@ -20728,6 +20728,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/inline/privateClass.kt");
}
@Test
@TestMetadata("privateOperatorsInInlineAfter.kt")
public void testPrivateOperatorsInInlineAfter() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/privateOperatorsInInlineAfter.kt");
}
@Test
@TestMetadata("privateOperatorsInInlineBefore.kt")
public void testPrivateOperatorsInInlineBefore() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/privateOperatorsInInlineBefore.kt");
}
@Test
@TestMetadata("propagation.kt")
public void testPropagation() throws Exception {
@@ -20734,6 +20734,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/inline/privateClass.kt");
}
@Test
@TestMetadata("privateOperatorsInInlineAfter.kt")
public void testPrivateOperatorsInInlineAfter() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/privateOperatorsInInlineAfter.kt");
}
@Test
@TestMetadata("privateOperatorsInInlineBefore.kt")
public void testPrivateOperatorsInInlineBefore() throws Exception {
runTest("compiler/testData/diagnostics/tests/inline/privateOperatorsInInlineBefore.kt");
}
@Test
@TestMetadata("propagation.kt")
public void testPropagation() throws Exception {