From fece081265121268036816336eac6359f4354bd7 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 5 Mar 2024 14:31:45 +0200 Subject: [PATCH] [Test] Reproduce KT-66313 --- ...sticCompilerTestFE10TestdataTestGenerated.java | 6 ++++++ ...agnosticCompilerFE10TestDataTestGenerated.java | 6 ++++++ ...htTreeOldFrontendDiagnosticsTestGenerated.java | 6 ++++++ ...FirPsiOldFrontendDiagnosticsTestGenerated.java | 6 ++++++ .../resolve/complexOrderAndImplicitTypes.fir.kt | 15 +++++++++++++++ .../tests/resolve/complexOrderAndImplicitTypes.kt | 15 +++++++++++++++ .../test/runners/DiagnosticTestGenerated.java | 6 ++++++ 7 files changed, 60 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.fir.kt create mode 100644 compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt 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 eb753642578..0e3b622600a 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 @@ -32280,6 +32280,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } + @Test + @TestMetadata("complexOrderAndImplicitTypes.kt") + public void testComplexOrderAndImplicitTypes() { + runTest("compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt"); + } + @Test @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() { 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 f11d6c25be7..e81b19773b1 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 @@ -32280,6 +32280,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } + @Test + @TestMetadata("complexOrderAndImplicitTypes.kt") + public void testComplexOrderAndImplicitTypes() { + runTest("compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt"); + } + @Test @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() { 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 7eeafdb3789..f7a10756049 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 @@ -29978,6 +29978,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } + @Test + @TestMetadata("complexOrderAndImplicitTypes.kt") + public void testComplexOrderAndImplicitTypes() { + runTest("compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt"); + } + @Test @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() { 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 1d6bc4a7f74..136a1589e74 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 @@ -29990,6 +29990,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } + @Test + @TestMetadata("complexOrderAndImplicitTypes.kt") + public void testComplexOrderAndImplicitTypes() { + runTest("compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt"); + } + @Test @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() { diff --git a/compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.fir.kt b/compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.fir.kt new file mode 100644 index 00000000000..8fd5b72431d --- /dev/null +++ b/compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.fir.kt @@ -0,0 +1,15 @@ +// ISSUE: KT-66313 + +val foo: String get() = "" + +class Test1 { + private val otherFoo = foo + + fun getFoo() = otherFoo +} + +class Test2 { + fun getFoo() = otherFoo + + private val otherFoo = foo +} diff --git a/compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt b/compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt new file mode 100644 index 00000000000..80b5a1a3924 --- /dev/null +++ b/compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt @@ -0,0 +1,15 @@ +// ISSUE: KT-66313 + +val foo: String get() = "" + +class Test1 { + private val otherFoo = foo + + fun getFoo() = otherFoo +} + +class Test2 { + fun getFoo() = otherFoo + + private val otherFoo = 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 eb5a5e06a31..13207ac3f6c 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 @@ -32280,6 +32280,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } + @Test + @TestMetadata("complexOrderAndImplicitTypes.kt") + public void testComplexOrderAndImplicitTypes() { + runTest("compiler/testData/diagnostics/tests/resolve/complexOrderAndImplicitTypes.kt"); + } + @Test @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() {