diff --git a/compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt b/compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt new file mode 100644 index 00000000000..885fe4f9893 --- /dev/null +++ b/compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt @@ -0,0 +1,22 @@ +// IGNORE_BACKEND_FIR: JVM_IR + +open class Base { + open fun f(x: T): String { + return "Fail" + } +} + +abstract class Derived : Base() { + abstract override fun f(x: String): String +} + +class Implementation : Derived() { + override fun f(x: String): String { + return x + } +} + +fun box(): String { + val base = Implementation() as Base + return base.f("OK") +} diff --git a/compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt b/compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt new file mode 100644 index 00000000000..d7ded261858 --- /dev/null +++ b/compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt @@ -0,0 +1,22 @@ +// IGNORE_BACKEND: JS_IR + +var result = "Fail" + +interface A { + fun f(x: T) { + result = x.toString() + } +} + +abstract class B1 : A + +interface B2 { + fun f(x: String) +} + +class C : B1(), B2 + +fun box(): String { + (C() as B2).f("OK") + return result +} diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt b/compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt index 54f83f9b75d..088c35ae6c1 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/doubleBreak.kt @@ -2,6 +2,7 @@ // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST +// IGNORE_BACKEND_FIR: JVM_IR import helpers.* import COROUTINES_PACKAGE.* import COROUTINES_PACKAGE.intrinsics.* diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/throwFromFinally.kt b/compiler/testData/codegen/box/coroutines/controlFlow/throwFromFinally.kt index be178abb472..601b21229a9 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/throwFromFinally.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/throwFromFinally.kt @@ -2,6 +2,7 @@ // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST +// IGNORE_BACKEND_FIR: JVM_IR import helpers.* import COROUTINES_PACKAGE.* import COROUTINES_PACKAGE.intrinsics.* diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt index 1f4603ca50e..7dd97a0ee16 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt @@ -2,6 +2,7 @@ // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST +// IGNORE_BACKEND_FIR: JVM_IR import helpers.* import COROUTINES_PACKAGE.* diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt index b751ea7383a..e4f478a53d9 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/interfaceDelegateWithInlineClass.kt @@ -2,6 +2,7 @@ // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST +// IGNORE_BACKEND_FIR: JVM_IR import helpers.* import COROUTINES_PACKAGE.* diff --git a/compiler/testData/codegen/box/extensionFunctions/kt1776.kt b/compiler/testData/codegen/box/extensionFunctions/kt1776.kt index 5174d4cc374..d52eab9d9b8 100644 --- a/compiler/testData/codegen/box/extensionFunctions/kt1776.kt +++ b/compiler/testData/codegen/box/extensionFunctions/kt1776.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + interface Expr { public fun ttFun() : Int = 12 } @@ -17,4 +19,4 @@ fun box() : String { if (Num(11).sometest() != 11) return "fail ${Num(11).sometest()}" return "OK" -} \ No newline at end of file +} diff --git a/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt new file mode 100644 index 00000000000..8b0922ff1bd --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt @@ -0,0 +1,24 @@ +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND_FIR: JVM_IR + +inline class A(val s: String) + +abstract class B { + abstract fun f(x: T, y: U): String +} + +open class C: B() { + override fun f(x: T, y: A): String = y.s + " 1" +} + +open class D : C() { + override fun f(x: A, y: A): String = y.s + " 2" +} + +class E : D() { + override fun f(x: A, y: A): String = x.s +} + +fun box(): String { + return E().f(A("OK"), A("Fail")) +} diff --git a/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt new file mode 100644 index 00000000000..c765d9aa0dd --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt @@ -0,0 +1,28 @@ +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND_FIR: JVM_IR + +inline class A(val s: String) + +interface B { + fun f(x: T, y: U): String +} + +interface L { + fun f(x: T, y: A): String +} + +interface R { + fun f(x: A, y: T): String +} + +open class C { + open fun f(x: A, y: A): String = y.s +} + +class D: C(), B, L, R { + override fun f(x: A, y: A): String = x.s +} + +fun box(): String { + return (D() as B).f(A("OK"), A("Fail")) +} diff --git a/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt new file mode 100644 index 00000000000..d03d188e318 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt @@ -0,0 +1,18 @@ +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND_FIR: JVM_IR + +inline class A(val s: String) + +interface B { + fun f(x: T): T +} + +open class C { + open fun f(x: A): A = A("OK") +} + +class D : C(), B + +fun box(): String { + return (D() as B).f(A("Fail")).s +} diff --git a/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt new file mode 100644 index 00000000000..dbc48ed4023 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt @@ -0,0 +1,16 @@ +// !LANGUAGE: +InlineClasses +// IGNORE_BACKEND_FIR: JVM_IR + +inline class A(val s: String) + +abstract class B { + abstract fun f(x: T): T +} + +class C: B() { + override fun f(x: A): A = x +} + +fun box(): String { + return C().f(A("OK")).s +} diff --git a/compiler/testData/codegen/box/regressions/kt2060.kt b/compiler/testData/codegen/box/regressions/kt2060.kt index 8c11476e83a..374e73111fb 100644 --- a/compiler/testData/codegen/box/regressions/kt2060.kt +++ b/compiler/testData/codegen/box/regressions/kt2060.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // FILE: 1.kt import testing.ClassWithInternals diff --git a/compiler/testData/codegen/box/regressions/kt5445.kt b/compiler/testData/codegen/box/regressions/kt5445.kt index 4d2d387d5a5..b5e906842fc 100644 --- a/compiler/testData/codegen/box/regressions/kt5445.kt +++ b/compiler/testData/codegen/box/regressions/kt5445.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/regressions/kt5445_2.kt b/compiler/testData/codegen/box/regressions/kt5445_2.kt index 77eb3ca9deb..f98527129c9 100644 --- a/compiler/testData/codegen/box/regressions/kt5445_2.kt +++ b/compiler/testData/codegen/box/regressions/kt5445_2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/smartCasts/falseSmartCast.kt b/compiler/testData/codegen/box/smartCasts/falseSmartCast.kt index cfdcf7e1e7c..22caecfb378 100644 --- a/compiler/testData/codegen/box/smartCasts/falseSmartCast.kt +++ b/compiler/testData/codegen/box/smartCasts/falseSmartCast.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + open class SuperFoo { public fun bar(): String { if (this is Foo) { @@ -14,4 +16,4 @@ class Foo : SuperFoo() { public fun superFoo() {} } -fun box(): String = Foo().bar() \ No newline at end of file +fun box(): String = Foo().bar() diff --git a/compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt b/compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt index ce31ad2d9f3..c34ad3945f6 100644 --- a/compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt +++ b/compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + open class A { fun f(): String = when (this) { diff --git a/compiler/testData/codegen/box/syntheticAccessors/jvmField.kt b/compiler/testData/codegen/box/syntheticAccessors/jvmField.kt index 15aa93facf1..76c38ef8d7e 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/jvmField.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/jvmField.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/syntheticAccessors/kt9958.kt b/compiler/testData/codegen/box/syntheticAccessors/kt9958.kt index 4420d29df0b..d138dc19fe4 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/kt9958.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/kt9958.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // FILE: a.kt package a diff --git a/compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt b/compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt index 2607be52e4e..639bf6b35bb 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // FILE: a.kt package a diff --git a/compiler/testData/codegen/box/traits/multiple.kt b/compiler/testData/codegen/box/traits/multiple.kt index 451d7a87d1e..bc6470c0d6b 100644 --- a/compiler/testData/codegen/box/traits/multiple.kt +++ b/compiler/testData/codegen/box/traits/multiple.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface AL { fun get(index: Int) : Any? = null } diff --git a/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt b/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt index a4587005887..a844b824178 100644 --- a/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt +++ b/compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR + open class A class B : A() { diff --git a/compiler/testData/codegen/bytecodeText/interfaces/addedInterfaceBridge.kt b/compiler/testData/codegen/bytecodeText/interfaces/addedInterfaceBridge.kt new file mode 100644 index 00000000000..99ef633275c --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/interfaces/addedInterfaceBridge.kt @@ -0,0 +1,19 @@ +interface A { + fun f(x: T): T +} + +open class B { + open fun f(x: String): String = x +} + +open class C : B(), A + +class D : C() + +fun box(): String { + return (D() as A).f("OK") +} + +// class D should not have an additional bridge +// 1 public synthetic bridge f\(Ljava/lang/Object;\)Ljava/lang/Object; +// 1 bridge diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 2be4cbcf178..4b13548dc27 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -1373,6 +1373,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } + @TestMetadata("abstractOverrideBridge.kt") + public void testAbstractOverrideBridge() throws Exception { + runTest("compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt"); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } @@ -1457,6 +1462,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } + @TestMetadata("fakeOverrideThroughGenericSuperclass.kt") + public void testFakeOverrideThroughGenericSuperclass() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt"); + } + @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); @@ -13922,6 +13932,21 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("complexGenericMethodWithInlineClassOverride.kt") + public void testComplexGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride2.kt") + public void testComplexGenericMethodWithInlineClassOverride2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride3.kt") + public void testComplexGenericMethodWithInlineClassOverride3() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt"); + } + @TestMetadata("defaultInterfaceExtensionFunCall.kt") public void testDefaultInterfaceExtensionFunCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/defaultInterfaceExtensionFunCall.kt"); @@ -13947,6 +13972,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt"); } + @TestMetadata("genericMethodWithInlineClassOverride.kt") + public void testGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt"); + } + @TestMetadata("overriddenDefaultInterfaceMethodCall.kt") public void testOverriddenDefaultInterfaceMethodCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/overriddenDefaultInterfaceMethodCall.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index b6f37eff3a3..c4200354459 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -2894,6 +2894,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } + @TestMetadata("addedInterfaceBridge.kt") + public void testAddedInterfaceBridge() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/interfaces/addedInterfaceBridge.kt"); + } + public void testAllFilesPresentInInterfaces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 93ed5ae771b..3ab0bf2548c 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -1373,6 +1373,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } + @TestMetadata("abstractOverrideBridge.kt") + public void testAbstractOverrideBridge() throws Exception { + runTest("compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt"); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } @@ -1457,6 +1462,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } + @TestMetadata("fakeOverrideThroughGenericSuperclass.kt") + public void testFakeOverrideThroughGenericSuperclass() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt"); + } + @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); @@ -13922,6 +13932,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("complexGenericMethodWithInlineClassOverride.kt") + public void testComplexGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride2.kt") + public void testComplexGenericMethodWithInlineClassOverride2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride3.kt") + public void testComplexGenericMethodWithInlineClassOverride3() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt"); + } + @TestMetadata("defaultInterfaceExtensionFunCall.kt") public void testDefaultInterfaceExtensionFunCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/defaultInterfaceExtensionFunCall.kt"); @@ -13947,6 +13972,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt"); } + @TestMetadata("genericMethodWithInlineClassOverride.kt") + public void testGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt"); + } + @TestMetadata("overriddenDefaultInterfaceMethodCall.kt") public void testOverriddenDefaultInterfaceMethodCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/overriddenDefaultInterfaceMethodCall.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 2f75f97bc51..a330352a3d5 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -1353,6 +1353,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); } + @TestMetadata("abstractOverrideBridge.kt") + public void testAbstractOverrideBridge() throws Exception { + runTest("compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt"); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } @@ -1437,6 +1442,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } + @TestMetadata("fakeOverrideThroughGenericSuperclass.kt") + public void testFakeOverrideThroughGenericSuperclass() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt"); + } + @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); @@ -12797,6 +12807,21 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("complexGenericMethodWithInlineClassOverride.kt") + public void testComplexGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride2.kt") + public void testComplexGenericMethodWithInlineClassOverride2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride3.kt") + public void testComplexGenericMethodWithInlineClassOverride3() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt"); + } + @TestMetadata("defaultInterfaceExtensionFunCall.kt") public void testDefaultInterfaceExtensionFunCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/defaultInterfaceExtensionFunCall.kt"); @@ -12822,6 +12847,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt"); } + @TestMetadata("genericMethodWithInlineClassOverride.kt") + public void testGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt"); + } + @TestMetadata("overriddenDefaultInterfaceMethodCall.kt") public void testOverriddenDefaultInterfaceMethodCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/overriddenDefaultInterfaceMethodCall.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index dcab3eb9f13..6234e833454 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -1353,6 +1353,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } + @TestMetadata("abstractOverrideBridge.kt") + public void testAbstractOverrideBridge() throws Exception { + runTest("compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt"); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } @@ -1437,6 +1442,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } + @TestMetadata("fakeOverrideThroughGenericSuperclass.kt") + public void testFakeOverrideThroughGenericSuperclass() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt"); + } + @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); @@ -12797,6 +12807,21 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("complexGenericMethodWithInlineClassOverride.kt") + public void testComplexGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride2.kt") + public void testComplexGenericMethodWithInlineClassOverride2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride3.kt") + public void testComplexGenericMethodWithInlineClassOverride3() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt"); + } + @TestMetadata("defaultInterfaceExtensionFunCall.kt") public void testDefaultInterfaceExtensionFunCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/defaultInterfaceExtensionFunCall.kt"); @@ -12822,6 +12847,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt"); } + @TestMetadata("genericMethodWithInlineClassOverride.kt") + public void testGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt"); + } + @TestMetadata("overriddenDefaultInterfaceMethodCall.kt") public void testOverriddenDefaultInterfaceMethodCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/overriddenDefaultInterfaceMethodCall.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java index ab04c051d44..94ff61b525d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeTextTestGenerated.java @@ -2939,6 +2939,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); } + @TestMetadata("addedInterfaceBridge.kt") + public void testAddedInterfaceBridge() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/interfaces/addedInterfaceBridge.kt"); + } + public void testAllFilesPresentInInterfaces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/interfaces"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 81c6064486c..4e3fde3e8ea 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -983,6 +983,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); } + @TestMetadata("abstractOverrideBridge.kt") + public void testAbstractOverrideBridge() throws Exception { + runTest("compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt"); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } @@ -1057,6 +1062,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } + @TestMetadata("fakeOverrideThroughGenericSuperclass.kt") + public void testFakeOverrideThroughGenericSuperclass() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt"); + } + @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); @@ -11072,6 +11082,21 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @TestMetadata("complexGenericMethodWithInlineClassOverride.kt") + public void testComplexGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride2.kt") + public void testComplexGenericMethodWithInlineClassOverride2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride3.kt") + public void testComplexGenericMethodWithInlineClassOverride3() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt"); + } + @TestMetadata("defaultInterfaceExtensionFunCall.kt") public void testDefaultInterfaceExtensionFunCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/defaultInterfaceExtensionFunCall.kt"); @@ -11097,6 +11122,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt"); } + @TestMetadata("genericMethodWithInlineClassOverride.kt") + public void testGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt"); + } + @TestMetadata("overriddenDefaultInterfaceMethodCall.kt") public void testOverriddenDefaultInterfaceMethodCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/overriddenDefaultInterfaceMethodCall.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index e49e3c3660c..cf038f9755c 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -983,6 +983,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); } + @TestMetadata("abstractOverrideBridge.kt") + public void testAbstractOverrideBridge() throws Exception { + runTest("compiler/testData/codegen/box/bridges/abstractOverrideBridge.kt"); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } @@ -1057,6 +1062,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } + @TestMetadata("fakeOverrideThroughGenericSuperclass.kt") + public void testFakeOverrideThroughGenericSuperclass() throws Exception { + runTest("compiler/testData/codegen/box/bridges/fakeOverrideThroughGenericSuperclass.kt"); + } + @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); @@ -11137,6 +11147,21 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @TestMetadata("complexGenericMethodWithInlineClassOverride.kt") + public void testComplexGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride2.kt") + public void testComplexGenericMethodWithInlineClassOverride2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride2.kt"); + } + + @TestMetadata("complexGenericMethodWithInlineClassOverride3.kt") + public void testComplexGenericMethodWithInlineClassOverride3() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/complexGenericMethodWithInlineClassOverride3.kt"); + } + @TestMetadata("defaultInterfaceExtensionFunCall.kt") public void testDefaultInterfaceExtensionFunCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/defaultInterfaceExtensionFunCall.kt"); @@ -11162,6 +11187,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericInterfaceMethodCall.kt"); } + @TestMetadata("genericMethodWithInlineClassOverride.kt") + public void testGenericMethodWithInlineClassOverride() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/genericMethodWithInlineClassOverride.kt"); + } + @TestMetadata("overriddenDefaultInterfaceMethodCall.kt") public void testOverriddenDefaultInterfaceMethodCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/interfaceMethodCalls/overriddenDefaultInterfaceMethodCall.kt");