Add test for KT-48478
This commit is contained in:
+6
@@ -2949,6 +2949,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("toStringNoReflect.kt")
|
||||
public void testToStringNoReflect() throws Exception {
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_COROUTINES
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: WASM
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
suspend fun foo(x: suspend () -> Unit) = x()
|
||||
|
||||
suspend fun bar(): Int = suspendCoroutineUninterceptedOrReturn<Int> {
|
||||
it.resume(1)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
suspend {
|
||||
foo(::bar)
|
||||
result += "OK"
|
||||
}.startCoroutine(EmptyContinuation)
|
||||
return result
|
||||
}
|
||||
+6
@@ -2877,6 +2877,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("toStringNoReflect.kt")
|
||||
public void testToStringNoReflect() throws Exception {
|
||||
|
||||
+6
@@ -2949,6 +2949,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("toStringNoReflect.kt")
|
||||
public void testToStringNoReflect() throws Exception {
|
||||
|
||||
+5
@@ -2523,6 +2523,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("toStringNoReflect.kt")
|
||||
public void testToStringNoReflect() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/toStringNoReflect.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -1728,6 +1728,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unboundReferences.kt")
|
||||
public void testUnboundReferences() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
|
||||
|
||||
Generated
+5
@@ -1728,6 +1728,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unboundReferences.kt")
|
||||
public void testUnboundReferences() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
|
||||
|
||||
Generated
+5
@@ -1708,6 +1708,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unboundReferences.kt")
|
||||
public void testUnboundReferences() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -1478,6 +1478,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendUnitConversion.kt")
|
||||
public void testSuspendUnitConversion() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/suspendUnitConversion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unboundReferences.kt")
|
||||
public void testUnboundReferences() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
|
||||
|
||||
Reference in New Issue
Block a user