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 71ba64de1c0..1743701e718 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 @@ -35214,6 +35214,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } + @Test + @TestMetadata("privateInFileInDifferentModule.kt") + public void testPrivateInFileInDifferentModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt"); + } + @Test @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() 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 d77c701c476..eba212a0e02 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 @@ -35214,6 +35214,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } + @Test + @TestMetadata("privateInFileInDifferentModule.kt") + public void testPrivateInFileInDifferentModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt"); + } + @Test @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() 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 751e97ba6ac..182b6517d66 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 @@ -35214,6 +35214,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } + @Test + @TestMetadata("privateInFileInDifferentModule.kt") + public void testPrivateInFileInDifferentModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt"); + } + @Test @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() 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 c8ac3aec526..3ddea72ab88 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 @@ -35328,6 +35328,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } + @Test + @TestMetadata("privateInFileInDifferentModule.kt") + public void testPrivateInFileInDifferentModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt"); + } + @Test @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() throws Exception { diff --git a/compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.fir.kt b/compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.fir.kt new file mode 100644 index 00000000000..27cad13717f --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.fir.kt @@ -0,0 +1,25 @@ +// ISSUE: KT-62537 +// MODULE: m1 +// FILE: file1.kt +private class C { + companion object +} + +private typealias TA = C + +private val test1: C = C() +private val test1co: C.Companion = C + +private val test2: TA = TA() +private val test2co = TA + +// MODULE: m2(m1) +// FILE: file2.kt +private val test1: C = C() +private val test1co: C.Companion = C + +private val test2: TA = TA() +private val test2co = TA + +private class C +private typealias TA = Int diff --git a/compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt b/compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt new file mode 100644 index 00000000000..f92cd219385 --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt @@ -0,0 +1,25 @@ +// ISSUE: KT-62537 +// MODULE: m1 +// FILE: file1.kt +private class C { + companion object +} + +private typealias TA = C + +private val test1: C = C() +private val test1co: C.Companion = C + +private val test2: TA = TA() +private val test2co = TA + +// MODULE: m2(m1) +// FILE: file2.kt +private val test1: C = C() +private val test1co: C.Companion = C + +private val test2: TA = TA() +private val test2co = TA + +private class C +private typealias TA = Int 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 29a744998a1..c7108e444d0 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 @@ -37202,6 +37202,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } + @Test + @TestMetadata("privateInFileInDifferentModule.kt") + public void testPrivateInFileInDifferentModule() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/privateInFileInDifferentModule.kt"); + } + @Test @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() throws Exception {