Minor, add regression test
#KT-42554
This commit is contained in:
Generated
+5
@@ -6783,6 +6783,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines");
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun launch(block: suspend () -> String): String {
|
||||
var result = ""
|
||||
block.startCoroutine(Continuation(EmptyCoroutineContext) { result = it.getOrThrow() })
|
||||
return result
|
||||
}
|
||||
|
||||
enum class E { A }
|
||||
|
||||
class C(val e: E) {
|
||||
val result = launch {
|
||||
when (e) {
|
||||
E.A -> "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = C(E.A).result
|
||||
+5
@@ -7038,6 +7038,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -7038,6 +7038,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -6783,6 +6783,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines");
|
||||
|
||||
Generated
+5
@@ -5638,6 +5638,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines");
|
||||
|
||||
Generated
+5
@@ -5638,6 +5638,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines");
|
||||
|
||||
+5
@@ -5638,6 +5638,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt42554.kt")
|
||||
public void testKt42554() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt42554.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lastExpressionIsLoop.kt")
|
||||
public void testLastExpressionIsLoop_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines");
|
||||
|
||||
Reference in New Issue
Block a user