Added a test for KT-56500

This commit is contained in:
Igor Chevdar
2023-02-17 09:00:59 +02:00
committed by Space Team
parent 7c9e567496
commit 5d3b61364a
19 changed files with 124 additions and 0 deletions
@@ -1436,6 +1436,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class FirPsiBlackBoxInlineCodegenTestGenerated extends AbstractFirPsiBlac
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends A
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
+17
View File
@@ -0,0 +1,17 @@
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
class Box<T>(val value: T) {
inline fun run(block: (T) -> Unit) {
block(value)
}
}
// FILE: 2.kt
fun box(): String {
var result: String = "fail"
Box("OK").run { outer ->
val block = { result = outer }
block()
}
return result
}
@@ -1412,6 +1412,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1412,6 +1412,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1436,6 +1436,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1412,6 +1412,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1208,6 +1208,12 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1208,6 +1208,12 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1208,6 +1208,12 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1208,6 +1208,12 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -42221,6 +42221,12 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -41696,6 +41696,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@Test
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@Test
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
@@ -1095,6 +1095,11 @@ public class IrCodegenBoxInlineWasmTestGenerated extends AbstractIrCodegenBoxInl
runTest("compiler/testData/codegen/boxInline/capture/kt48230_2.kt");
}
@TestMetadata("kt56500.kt")
public void testKt56500() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
}
@TestMetadata("simpleCapturingInClass.kt")
public void testSimpleCapturingInClass() throws Exception {
runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt");