Add a test from KT-51950
This commit is contained in:
+6
@@ -338,6 +338,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class FirLightTreeBlackBoxInlineCodegenTestGenerated extends AbstractFirL
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
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")
|
||||||
+6
@@ -338,6 +338,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -338,6 +338,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -296,6 +296,12 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -296,6 +296,12 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
+6
@@ -39264,6 +39264,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/boxInline/anonymousObject/kt42815_delegated.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt6007.kt")
|
@TestMetadata("kt6007.kt")
|
||||||
public void testKt6007() throws Exception {
|
public void testKt6007() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user