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 7b8c8628efa..12d3bba0983 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 @@ -165,6 +165,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/Builders.kt"); } + @Test + @TestMetadata("callingProtectedFromInline.kt") + public void testCallingProtectedFromInline() throws Exception { + runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt"); + } + @Test @TestMetadata("capturedTypesSubtyping.kt") public void testCapturedTypesSubtyping() 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 8bfde0d50b3..d79af265be3 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 @@ -165,6 +165,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/Builders.kt"); } + @Test + @TestMetadata("callingProtectedFromInline.kt") + public void testCallingProtectedFromInline() throws Exception { + runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt"); + } + @Test @TestMetadata("capturedTypesSubtyping.kt") public void testCapturedTypesSubtyping() 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 f9440b7a1a8..ec9ec6e5c78 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 @@ -165,6 +165,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/Builders.kt"); } + @Test + @TestMetadata("callingProtectedFromInline.kt") + public void testCallingProtectedFromInline() throws Exception { + runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt"); + } + @Test @TestMetadata("capturedTypesSubtyping.kt") public void testCapturedTypesSubtyping() 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 32f801d201a..7068c2f9639 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 @@ -165,6 +165,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/Builders.kt"); } + @Test + @TestMetadata("callingProtectedFromInline.kt") + public void testCallingProtectedFromInline() throws Exception { + runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt"); + } + @Test @TestMetadata("capturedTypesSubtyping.kt") public void testCapturedTypesSubtyping() throws Exception { diff --git a/compiler/testData/diagnostics/tests/callingProtectedFromInline.fir.kt b/compiler/testData/diagnostics/tests/callingProtectedFromInline.fir.kt new file mode 100644 index 00000000000..2df665baa6b --- /dev/null +++ b/compiler/testData/diagnostics/tests/callingProtectedFromInline.fir.kt @@ -0,0 +1,12 @@ +// ISSUE: KT-65058 + +open class A { + protected fun foo() { + } +} + +inline fun bar() = object : A() { + fun baz() { + foo() + } +} diff --git a/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt b/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt new file mode 100644 index 00000000000..dd426a7b549 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callingProtectedFromInline.kt @@ -0,0 +1,12 @@ +// ISSUE: KT-65058 + +open class A { + protected fun foo() { + } +} + +inline fun bar() = object : A() { + fun baz() { + 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 072c41b8c3b..4d737a38edb 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 @@ -165,6 +165,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/Builders.kt"); } + @Test + @TestMetadata("callingProtectedFromInline.kt") + public void testCallingProtectedFromInline() throws Exception { + runTest("compiler/testData/diagnostics/tests/callingProtectedFromInline.kt"); + } + @Test @TestMetadata("capturedTypesSubtyping.kt") public void testCapturedTypesSubtyping() throws Exception {