Introduce DeprecatedSinceKotlin annotation
This annotation will be used in the standard library to prevent the new compiler from reporting deprecation diagnostics in case an older API version is used (where the declaration was not deprecated yet). #KT-23575 Fixed
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
b2022144e6
commit
0aaf29c045
@@ -6651,6 +6651,34 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
|
||||
public void testWarningOnConstructorErrorOnClass() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/warningOnConstructorErrorOnClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class DeprecatedSinceKotlin extends AbstractDiagnosticsTestWithFirValidation {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDeprecatedSinceKotlin() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("error.kt")
|
||||
public void testError() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/error.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("hidden.kt")
|
||||
public void testHidden() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/hidden.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("warning.kt")
|
||||
public void testWarning() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedSinceKotlin/warning.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature")
|
||||
|
||||
Reference in New Issue
Block a user