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 97e71074dfa..491f662972a 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 @@ -33406,6 +33406,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt"); } + @Test + @TestMetadata("inGenericArgument.kt") + public void testInGenericArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt"); + } + @Test @TestMetadata("overloadResolutionBySuspendModifier.kt") public void testOverloadResolutionBySuspendModifier() 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 0137f1e8ccb..00910487b52 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 @@ -33406,6 +33406,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt"); } + @Test + @TestMetadata("inGenericArgument.kt") + public void testInGenericArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt"); + } + @Test @TestMetadata("overloadResolutionBySuspendModifier.kt") public void testOverloadResolutionBySuspendModifier() 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 973edb2679d..ae4dbd3293d 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 @@ -33406,6 +33406,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt"); } + @Test + @TestMetadata("inGenericArgument.kt") + public void testInGenericArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt"); + } + @Test @TestMetadata("overloadResolutionBySuspendModifier.kt") public void testOverloadResolutionBySuspendModifier() 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 7d107442ff5..aeeae06fbf6 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 @@ -33520,6 +33520,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt"); } + @Test + @TestMetadata("inGenericArgument.kt") + public void testInGenericArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt"); + } + @Test @TestMetadata("overloadResolutionBySuspendModifier.kt") public void testOverloadResolutionBySuspendModifier() throws Exception { diff --git a/compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.fir.kt b/compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.fir.kt new file mode 100644 index 00000000000..6efcc16fcc9 --- /dev/null +++ b/compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.fir.kt @@ -0,0 +1,17 @@ +// ISSUE: KT-61933 + +data class Bar( + val foo: Foo Unit> +) + +data class Foo( + val state: TCallback?, +) + +fun usage(b: Boolean) { + Bar( + foo = Foo( + state = if (b) { -> } else null, + ) + ) +} diff --git a/compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt b/compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt new file mode 100644 index 00000000000..01f642c345a --- /dev/null +++ b/compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt @@ -0,0 +1,17 @@ +// ISSUE: KT-61933 + +data class Bar( + val foo: Foo Unit> +) + +data class Foo( + val state: TCallback?, +) + +fun usage(b: Boolean) { + Bar( + foo = Foo( + state = if (b) { -> } else 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 c8b191eae91..89202ee5bf8 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 @@ -35302,6 +35302,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt"); } + @Test + @TestMetadata("inGenericArgument.kt") + public void testInGenericArgument() throws Exception { + runTest("compiler/testData/diagnostics/tests/suspendConversion/inGenericArgument.kt"); + } + @Test @TestMetadata("overloadResolutionBySuspendModifier.kt") public void testOverloadResolutionBySuspendModifier() throws Exception {