[Test] Reproduce KT-66258

This commit is contained in:
Dmitriy Novozhilov
2024-03-04 14:38:42 +02:00
committed by Space Team
parent 172df04c9b
commit 5e742884de
7 changed files with 66 additions and 0 deletions
@@ -38245,6 +38245,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onTypeParameter.kt");
}
@Test
@TestMetadata("optInDiagnosticOnPropertyGetter.kt")
public void testOptInDiagnosticOnPropertyGetter() {
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/optInDiagnosticOnPropertyGetter.kt");
}
@Test
@TestMetadata("suppressOnDeclarationItself.kt")
public void testSuppressOnDeclarationItself() {
@@ -38245,6 +38245,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onTypeParameter.kt");
}
@Test
@TestMetadata("optInDiagnosticOnPropertyGetter.kt")
public void testOptInDiagnosticOnPropertyGetter() {
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/optInDiagnosticOnPropertyGetter.kt");
}
@Test
@TestMetadata("suppressOnDeclarationItself.kt")
public void testSuppressOnDeclarationItself() {
@@ -35817,6 +35817,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onTypeParameter.kt");
}
@Test
@TestMetadata("optInDiagnosticOnPropertyGetter.kt")
public void testOptInDiagnosticOnPropertyGetter() {
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/optInDiagnosticOnPropertyGetter.kt");
}
@Test
@TestMetadata("suppressOnDeclarationItself.kt")
public void testSuppressOnDeclarationItself() {
@@ -35955,6 +35955,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onTypeParameter.kt");
}
@Test
@TestMetadata("optInDiagnosticOnPropertyGetter.kt")
public void testOptInDiagnosticOnPropertyGetter() {
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/optInDiagnosticOnPropertyGetter.kt");
}
@Test
@TestMetadata("suppressOnDeclarationItself.kt")
public void testSuppressOnDeclarationItself() {
@@ -0,0 +1,18 @@
// DIAGNOSTICS: -ERROR_SUPPRESSION
// WITH_STDLIB
// ISSUE: KT-66258
@RequiresOptIn
annotation class Ann
class A(
<!OPT_IN_MARKER_ON_WRONG_TARGET!>@get:Ann<!>
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
val s: String
)
class B {
@get:Ann
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
val s: String = ""
}
@@ -0,0 +1,18 @@
// DIAGNOSTICS: -ERROR_SUPPRESSION
// WITH_STDLIB
// ISSUE: KT-66258
@RequiresOptIn
annotation class Ann
class A(
@get:Ann
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
val s: String
)
class B {
@get:Ann
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
val s: String = ""
}
@@ -38245,6 +38245,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onTypeParameter.kt");
}
@Test
@TestMetadata("optInDiagnosticOnPropertyGetter.kt")
public void testOptInDiagnosticOnPropertyGetter() {
runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/optInDiagnosticOnPropertyGetter.kt");
}
@Test
@TestMetadata("suppressOnDeclarationItself.kt")
public void testSuppressOnDeclarationItself() {