K2: reproduce KT-61933
This commit is contained in:
committed by
Space Team
parent
ad4d1a5ba8
commit
0c287c9945
+6
@@ -33406,6 +33406,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt");
|
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
|
@Test
|
||||||
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
||||||
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
||||||
|
|||||||
+6
@@ -33406,6 +33406,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt");
|
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
|
@Test
|
||||||
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
||||||
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
||||||
|
|||||||
+6
@@ -33406,6 +33406,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt");
|
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
|
@Test
|
||||||
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
||||||
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
||||||
|
|||||||
+6
@@ -33520,6 +33520,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt");
|
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
|
@Test
|
||||||
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
||||||
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
// ISSUE: KT-61933
|
||||||
|
|
||||||
|
data class Bar(
|
||||||
|
val foo: Foo<suspend () -> Unit>
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Foo<out TCallback : Any>(
|
||||||
|
val state: TCallback?,
|
||||||
|
)
|
||||||
|
|
||||||
|
fun usage(b: Boolean) {
|
||||||
|
Bar(
|
||||||
|
foo = <!ARGUMENT_TYPE_MISMATCH!>Foo(
|
||||||
|
state = if (b) { -> } else null,
|
||||||
|
)<!>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// ISSUE: KT-61933
|
||||||
|
|
||||||
|
data class Bar(
|
||||||
|
val foo: Foo<suspend () -> Unit>
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Foo<out TCallback : Any>(
|
||||||
|
val state: TCallback?,
|
||||||
|
)
|
||||||
|
|
||||||
|
fun usage(b: Boolean) {
|
||||||
|
Bar(
|
||||||
|
foo = Foo(
|
||||||
|
state = if (b) { -> } else null,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
Generated
+6
@@ -35302,6 +35302,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/suspendConversion/chainedFunSuspendConversionForSimpleExpression.kt");
|
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
|
@Test
|
||||||
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
@TestMetadata("overloadResolutionBySuspendModifier.kt")
|
||||||
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
public void testOverloadResolutionBySuspendModifier() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user