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 608ecebb9ba..a4fa866aa30 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 @@ -38412,6 +38412,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/typealias/importMemberFromJavaViaAlias.kt"); } + @Test + @TestMetadata("importNestedTypeFromTypeAlias.kt") + public void testImportNestedTypeFromTypeAlias() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt"); + } + @Test @TestMetadata("inGenerics.kt") public void testInGenerics() 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 60478e1c37c..628a12596c4 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 @@ -38412,6 +38412,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/typealias/importMemberFromJavaViaAlias.kt"); } + @Test + @TestMetadata("importNestedTypeFromTypeAlias.kt") + public void testImportNestedTypeFromTypeAlias() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt"); + } + @Test @TestMetadata("inGenerics.kt") public void testInGenerics() 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 8b7bfa85797..7413d97aa5d 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 @@ -36180,6 +36180,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/typealias/importMemberFromJavaViaAlias.kt"); } + @Test + @TestMetadata("importNestedTypeFromTypeAlias.kt") + public void testImportNestedTypeFromTypeAlias() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt"); + } + @Test @TestMetadata("inGenerics.kt") public void testInGenerics() 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 cd0faabdc99..aef316a80be 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 @@ -36300,6 +36300,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/typealias/importMemberFromJavaViaAlias.kt"); } + @Test + @TestMetadata("importNestedTypeFromTypeAlias.kt") + public void testImportNestedTypeFromTypeAlias() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt"); + } + @Test @TestMetadata("inGenerics.kt") public void testInGenerics() throws Exception { diff --git a/compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.fir.kt b/compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.fir.kt new file mode 100644 index 00000000000..4d3b60d640d --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.fir.kt @@ -0,0 +1,16 @@ +// ISSUE: KT-61694 + +// FILE: a.kt + +package c +class C { + class Nested +} + +typealias TA = C + +// FILE: b.kt + +import c.TA.Nested + +val x: Nested? = null diff --git a/compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt b/compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt new file mode 100644 index 00000000000..6c710c77b92 --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt @@ -0,0 +1,16 @@ +// ISSUE: KT-61694 + +// FILE: a.kt + +package c +class C { + class Nested +} + +typealias TA = C + +// FILE: b.kt + +import c.TA.Nested + +val x: Nested? = null 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 2c3e73320d7..2e3c9584eba 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 @@ -38412,6 +38412,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/typealias/importMemberFromJavaViaAlias.kt"); } + @Test + @TestMetadata("importNestedTypeFromTypeAlias.kt") + public void testImportNestedTypeFromTypeAlias() throws Exception { + runTest("compiler/testData/diagnostics/tests/typealias/importNestedTypeFromTypeAlias.kt"); + } + @Test @TestMetadata("inGenerics.kt") public void testInGenerics() throws Exception {