Add a test from KT-51950

This commit is contained in:
pyos
2022-04-28 16:52:54 +02:00
committed by Mikhael Bogdanov
parent 7bdc09301d
commit a1f0c6208c
13 changed files with 96 additions and 0 deletions
@@ -338,6 +338,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class FirLightTreeBlackBoxInlineCodegenTestGenerated extends AbstractFirL
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -0,0 +1,24 @@
// FILE: 1.kt
interface Service {
fun send(message: String): String
}
inline fun Service.decorate(crossinline decorate: (Service) -> Service): Service =
object : Service by decorate(this) {}
inline fun Service.transformMessage(crossinline transform: (String) -> String) =
decorate { service ->
object : Service {
override fun send(message: String): String =
service.send(transform(message))
}
}
// FILE: 2.kt
fun Service.append(suffix: String): Service =
transformMessage { it + suffix }
fun box(): String =
object : Service {
override fun send(message: String): String = message
}.append("K").send("O")
@@ -338,6 +338,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -338,6 +338,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -296,6 +296,12 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -296,6 +296,12 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {
@@ -39264,6 +39264,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
}
@Test
@TestMetadata("kt51950.kt")
public void testKt51950() throws Exception {
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt51950.kt");
}
@Test
@TestMetadata("kt6007.kt")
public void testKt6007() throws Exception {