[box-tests] Added a reproducer for KT-56965
This commit is contained in:
+6
@@ -1442,6 +1442,12 @@ public class FirLightTreeBlackBoxInlineCodegenTestGenerated extends AbstractFirL
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class FirPsiBlackBoxInlineCodegenTestGenerated extends AbstractFirPsiBlac
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// NO_CHECK_LAMBDA_INLINING
|
||||||
|
// IGNORE_BACKEND: JVM
|
||||||
|
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_OLD_AGAINST_IR
|
||||||
|
// FILE: 1.kt
|
||||||
|
inline fun foo(block: () -> String) = block()
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
fun box() = foo {
|
||||||
|
val s = "O"
|
||||||
|
val obj = object {
|
||||||
|
fun local() = localInline { it }
|
||||||
|
inline fun localInline(block: (String) -> String) = block(s) + "K"
|
||||||
|
}
|
||||||
|
return obj.local()
|
||||||
|
}
|
||||||
+6
@@ -1418,6 +1418,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1418,6 +1418,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1442,6 +1442,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1418,6 +1418,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1214,6 +1214,12 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
Generated
+6
@@ -1214,6 +1214,12 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -1214,6 +1214,12 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
Generated
+6
@@ -1214,6 +1214,12 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -42239,6 +42239,12 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
+6
@@ -41714,6 +41714,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
|
|||||||
Generated
+5
@@ -1100,6 +1100,11 @@ public class IrCodegenBoxInlineWasmTestGenerated extends AbstractIrCodegenBoxInl
|
|||||||
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/kt56500.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt56965.kt")
|
||||||
|
public void testKt56965() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/capture/kt56965.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleCapturingInClass.kt")
|
@TestMetadata("simpleCapturingInClass.kt")
|
||||||
public void testSimpleCapturingInClass() throws Exception {
|
public void testSimpleCapturingInClass() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt");
|
runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user