[box-tests] Added a reproducer for #KT-64139
This commit is contained in:
+6
@@ -14473,6 +14473,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -14473,6 +14473,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -14414,6 +14414,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -14414,6 +14414,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -14414,6 +14414,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// WITH_STDLIB
|
||||
// WITH_COROUTINES
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(Unit)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
class Data(val x: Int)
|
||||
|
||||
fun box(): String {
|
||||
var result = ""
|
||||
|
||||
builder {
|
||||
var data = Data(0)
|
||||
var done = false
|
||||
do {
|
||||
data = Data(1)
|
||||
suspendHere()
|
||||
done = true
|
||||
} while (!done)
|
||||
result = if (data.x == 1) "OK" else "fail"
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
+6
@@ -14114,6 +14114,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -14414,6 +14414,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -14414,6 +14414,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+5
@@ -11742,6 +11742,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/lvtWithInlineOnly.kt");
|
||||
|
||||
+6
@@ -10712,6 +10712,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
Generated
+6
@@ -10712,6 +10712,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -10712,6 +10712,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -10712,6 +10712,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -11686,6 +11686,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -11946,6 +11946,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -11426,6 +11426,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
+6
@@ -11687,6 +11687,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
Generated
+6
@@ -10688,6 +10688,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
Generated
+6
@@ -10688,6 +10688,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt64139.kt")
|
||||
public void testKt64139() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user