diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFirTestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFirTestdataTestGenerated.java index 3d2a32decc7..a5791e6d435 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFirTestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFirTestdataTestGenerated.java @@ -3543,6 +3543,12 @@ public class DiagnosticCompilerTestFirTestdataTestGenerated extends AbstractDiag runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt"); } + @Test + @TestMetadata("onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt") + public void testOnlyInputTypesCapturedTypeWithRecursiveBoundsAfter() { + runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt"); + } + @Test @TestMetadata("overloadResolutionByLambdaArgumentType.kt") public void testOverloadResolutionByLambdaArgumentType() { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated.java index 6b0db25b6c3..ca974644b0a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated.java @@ -3543,6 +3543,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFirTestDataTestGenerated runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt"); } + @Test + @TestMetadata("onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt") + public void testOnlyInputTypesCapturedTypeWithRecursiveBoundsAfter() { + runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt"); + } + @Test @TestMetadata("overloadResolutionByLambdaArgumentType.kt") public void testOverloadResolutionByLambdaArgumentType() { diff --git a/compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt b/compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt index 6d564123bb4..268ad0aa5da 100644 --- a/compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt +++ b/compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt @@ -1,5 +1,6 @@ // FULL_JDK // WITH_STDLIB +// LANGUAGE: -JavaTypeParameterDefaultRepresentationWithDNN import java.util.EnumMap interface I @@ -21,8 +22,6 @@ open class FooEnumMap
(val data: EnumMap
) where P : Enum
, P : I
private fun test(node: FooEnumMap<*>) {
node.data.get(MyEnum.EnumEntry)
val map = node.data
- // TODO inferred type argument is giant multi-level type KT-65704
- // R| |, R|I|> : R|kotlin/Any| {
+ public constructor |, R|I|>(data: R|kotlin/collections/Map |): R|Foo | {
+ super | = R| |
+
+ }
+ private final fun test(node: R|Foo<*>|): R|kotlin/Unit| {
+ R| |, R|I|> : R|kotlin/Any| {
+ public constructor |, R|I|>(data: R|java/util/EnumMap |): R|FooEnumMap | {
+ super | = R| |
+
+ }
+ private final fun test(node: R|FooEnumMap<*>|): R|kotlin/Unit| {
+ R| : R|kotlin/Any| {
+ public constructor (data: R|kotlin/collections/Map |): R|Foo2 | {
+ super | = R| |
+
+ }
+ private final fun test(node: R|Foo2<*>|): R|kotlin/Unit| {
+ R| : R|kotlin/Any| {
+ public constructor (data: R|kotlin/collections/Map |): R|Foo3 | {
+ super | = R| |
+
+ }
+ public final fun test3(node: R|Foo3<*>|): R|kotlin/Unit| {
+ R| (val data: Map ) where P : Enum , P : I
+
+private fun test(node: Foo<*>) {
+ node.data.get(MyEnum.EnumEntry)
+ val map = node.data
+ map.get(MyEnum.EnumEntry)
+}
+
+open class FooEnumMap (val data: EnumMap ) where P : Enum , P : I
+
+private fun test(node: FooEnumMap<*>) {
+ node.data.get(MyEnum.EnumEntry)
+ val map = node.data
+ map.get(MyEnum.EnumEntry)
+}
+
+open class Foo2 (val data: Map )
+
+private fun test(node: Foo2<*>) {
+ node.data.get(MyEnum.EnumEntry)
+ val map = node.data
+ map.get(MyEnum.EnumEntry)
+}
+
+interface I2
+
+object C: I, I2
+
+open class Foo3 (val data: Map ) where P : I, P : I2
+
+fun test3(node: Foo3<*>) {
+ node.data.get(C)
+}
+
diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeDiagnosticsTestGenerated.java
index eb8599145d9..f7acbe5329e 100644
--- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeDiagnosticsTestGenerated.java
+++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeDiagnosticsTestGenerated.java
@@ -3543,6 +3543,12 @@ public class FirLightTreeDiagnosticsTestGenerated extends AbstractFirLightTreeDi
runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt");
}
+ @Test
+ @TestMetadata("onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt")
+ public void testOnlyInputTypesCapturedTypeWithRecursiveBoundsAfter() {
+ runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt");
+ }
+
@Test
@TestMetadata("overloadResolutionByLambdaArgumentType.kt")
public void testOverloadResolutionByLambdaArgumentType() {
diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiDiagnosticTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiDiagnosticTestGenerated.java
index bc91c1017a8..9e4fd82ef1f 100644
--- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiDiagnosticTestGenerated.java
+++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiDiagnosticTestGenerated.java
@@ -3543,6 +3543,12 @@ public class FirPsiDiagnosticTestGenerated extends AbstractFirPsiDiagnosticTest
runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBounds.kt");
}
+ @Test
+ @TestMetadata("onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt")
+ public void testOnlyInputTypesCapturedTypeWithRecursiveBoundsAfter() {
+ runTest("compiler/fir/analysis-tests/testData/resolve/inference/onlyInputTypesCapturedTypeWithRecursiveBoundsAfter.kt");
+ }
+
@Test
@TestMetadata("overloadResolutionByLambdaArgumentType.kt")
public void testOverloadResolutionByLambdaArgumentType() {