diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index b4546139ac8..dd5ae82ce94 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -969,6 +969,18 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } + @Test + @TestMetadata("suppressExposedPropertyTypeInConstructor.kt") + public void testSuppressExposedPropertyTypeInConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt"); + } + + @Test + @TestMetadata("suppressExposedPropertyTypeInPrivateConstructor.kt") + public void testSuppressExposedPropertyTypeInPrivateConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt"); + } + @Test @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index 6073708596e..1e8a3f86f5a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -969,6 +969,18 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } + @Test + @TestMetadata("suppressExposedPropertyTypeInConstructor.kt") + public void testSuppressExposedPropertyTypeInConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt"); + } + + @Test + @TestMetadata("suppressExposedPropertyTypeInPrivateConstructor.kt") + public void testSuppressExposedPropertyTypeInPrivateConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt"); + } + @Test @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index 2cfbe324153..75fff2a77cb 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -969,6 +969,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } + @Test + @TestMetadata("suppressExposedPropertyTypeInConstructor.kt") + public void testSuppressExposedPropertyTypeInConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt"); + } + + @Test + @TestMetadata("suppressExposedPropertyTypeInPrivateConstructor.kt") + public void testSuppressExposedPropertyTypeInPrivateConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt"); + } + @Test @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index be5e04edc4e..54de2a489f1 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -969,6 +969,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } + @Test + @TestMetadata("suppressExposedPropertyTypeInConstructor.kt") + public void testSuppressExposedPropertyTypeInConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt"); + } + + @Test + @TestMetadata("suppressExposedPropertyTypeInPrivateConstructor.kt") + public void testSuppressExposedPropertyTypeInPrivateConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt"); + } + @Test @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception { diff --git a/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.fir.kt b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.fir.kt new file mode 100644 index 00000000000..d6f71be854f --- /dev/null +++ b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.fir.kt @@ -0,0 +1,18 @@ +// ISSUE: KT-57458 + +private enum class Foo { A, B } + +class Bar constructor( + @Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Var constructor( + @property:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Zar constructor( + @param:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) diff --git a/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt new file mode 100644 index 00000000000..8781065ac09 --- /dev/null +++ b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt @@ -0,0 +1,18 @@ +// ISSUE: KT-57458 + +private enum class Foo { A, B } + +class Bar constructor( + @Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Var constructor( + @property:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Zar constructor( + @param:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) diff --git a/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.fir.kt b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.fir.kt new file mode 100644 index 00000000000..b9f32ed4b0b --- /dev/null +++ b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.fir.kt @@ -0,0 +1,18 @@ +// ISSUE: KT-57458 + +private enum class Foo { A, B } + +class Bar private constructor( + @Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Var private constructor( + @property:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Zar private constructor( + @param:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) diff --git a/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt new file mode 100644 index 00000000000..716b7dc8483 --- /dev/null +++ b/compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt @@ -0,0 +1,18 @@ +// ISSUE: KT-57458 + +private enum class Foo { A, B } + +class Bar private constructor( + @Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Var private constructor( + @property:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) + +class Zar private constructor( + @param:Suppress("EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR_ERROR") + val foo: Foo, +) diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index 78c84c9bd8a..5178a473862 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -969,6 +969,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } + @Test + @TestMetadata("suppressExposedPropertyTypeInConstructor.kt") + public void testSuppressExposedPropertyTypeInConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInConstructor.kt"); + } + + @Test + @TestMetadata("suppressExposedPropertyTypeInPrivateConstructor.kt") + public void testSuppressExposedPropertyTypeInPrivateConstructor() throws Exception { + runTest("compiler/testData/diagnostics/tests/suppressExposedPropertyTypeInPrivateConstructor.kt"); + } + @Test @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception {