JVM_IR: serialize fake overrides in IR
This commit is contained in:
committed by
TeamCityServer
parent
2d3a558d50
commit
96ce124268
+6
@@ -2516,6 +2516,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+3
@@ -26,6 +26,9 @@ class JvmIrSerializer(
|
||||
|
||||
// Usage protocol: construct an instance, call only one of `serializeIrFile()` and `serializeTopLevelClass()` only once.
|
||||
|
||||
// We do not reconstruct fake overrides upon deserialization (yet).
|
||||
override fun backendSpecificSerializeAllMembers(irClass: IrClass): Boolean = true
|
||||
|
||||
fun serializeJvmIrFile(irFile: IrFile): JvmIr.JvmIrFile {
|
||||
val proto = JvmIr.JvmIrFile.newBuilder()
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
open class C {
|
||||
fun f() = "OK"
|
||||
}
|
||||
|
||||
inline fun inlineFun(): String {
|
||||
val cc = object : C() {}
|
||||
return cc.f()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
fun box() = inlineFun()
|
||||
+6
@@ -2516,6 +2516,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+6
@@ -2516,6 +2516,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+6
@@ -2516,6 +2516,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+6
@@ -2516,6 +2516,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+6
@@ -2456,6 +2456,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+6
@@ -2516,6 +2516,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+6
@@ -2516,6 +2516,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("innerLambda.kt")
|
||||
public void testInnerLambda() throws Exception {
|
||||
|
||||
+5
@@ -2019,6 +2019,11 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
|
||||
public void testCaptureThisAndOuter() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
||||
|
||||
Generated
+5
@@ -2019,6 +2019,11 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
||||
public void testCaptureThisAndOuter() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
||||
|
||||
Generated
+5
@@ -2019,6 +2019,11 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
||||
public void testCaptureThisAndOuter() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/captureThisAndOuter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fakeOverride.kt")
|
||||
public void testFakeOverride() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/innerClasses/fakeOverride.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
||||
|
||||
Reference in New Issue
Block a user