Minor, add regression test

#KT-42554
This commit is contained in:
Alexander Udalov
2020-10-09 13:58:15 +02:00
parent 6f9f437f15
commit ac39e4d89c
8 changed files with 56 additions and 0 deletions
@@ -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");
+21
View File
@@ -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
@@ -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");
@@ -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");
@@ -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");
@@ -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");
@@ -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");
@@ -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");