[FIR] Create fake hidden versions of List.getFirst/getLast in JDK < 21

... so that overrides are marked as deprecated regardless of the JDK.

#KT-65440 Fixed
This commit is contained in:
Kirill Rakhman
2024-02-06 13:26:18 +01:00
committed by Space Team
parent c6b2675089
commit 2f49272c42
22 changed files with 399 additions and 3 deletions
@@ -36334,6 +36334,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava17"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("newListMethods.kt")
public void testNewListMethods() throws Exception {
runTest("compiler/testData/diagnostics/tests/testsWithJava17/newListMethods.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/testsWithJava17/jvmRecord")
@TestDataPath("$PROJECT_ROOT")
@@ -36460,6 +36460,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/testsWithJava17"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("newListMethods.kt")
public void testNewListMethods() throws Exception {
runTest("compiler/testData/diagnostics/tests/testsWithJava17/newListMethods.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/testsWithJava17/jvmRecord")
@TestDataPath("$PROJECT_ROOT")