diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index c7b954d85b4..90539e5874c 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -15057,6 +15057,29 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @@ -15291,6 +15314,29 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractFirBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: "); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt new file mode 100644 index 00000000000..352517fc003 --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt @@ -0,0 +1,33 @@ +// !JVM_DEFAULT_MODE: all-compatibility +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_RUNTIME + +interface Test { + @JvmDefault + fun test(): String { + return "O" + } + + fun delegatedTest(): String { + return "fail" + } +} + +class Delegate : Test { + override fun test(): String { + return "Fail" + } + + override fun delegatedTest(): String { + return "K" + } +} + +class TestClass(val foo: Test) : Test by foo + +fun box(): String { + val testClass = TestClass(Delegate()) + return testClass.test() + testClass.delegatedTest() +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt new file mode 100644 index 00000000000..321448288a7 --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt @@ -0,0 +1,30 @@ +// !JVM_DEFAULT_MODE: all-compatibility +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_RUNTIME + +interface Test { + @JvmDefault + val test: String + get() = "O" + + val testDelegated: String + get() = "fail" + +} + +class Delegate : Test { + override val test: String + get() = "fail" + + override val testDelegated: String + get() = "K" +} + +class TestClass(val foo: Test) : Test by foo + +fun box(): String { + val testClass = TestClass(Delegate()) + return testClass.test + testClass.testDelegated +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt new file mode 100644 index 00000000000..59839f167d9 --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt @@ -0,0 +1,33 @@ +// !JVM_DEFAULT_MODE: all +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_RUNTIME + +interface Test { + @JvmDefault + fun test(): String { + return "O" + } + + fun delegatedTest(): String { + return "fail" + } +} + +class Delegate : Test { + override fun test(): String { + return "Fail" + } + + override fun delegatedTest(): String { + return "K" + } +} + +class TestClass(val foo: Test) : Test by foo + +fun box(): String { + val testClass = TestClass(Delegate()) + return testClass.test() + testClass.delegatedTest() +} diff --git a/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt new file mode 100644 index 00000000000..ca4f91aaa96 --- /dev/null +++ b/compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt @@ -0,0 +1,30 @@ +// !JVM_DEFAULT_MODE: all +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_RUNTIME + +interface Test { + @JvmDefault + val test: String + get() = "O" + + val testDelegated: String + get() = "fail" + +} + +class Delegate : Test { + override val test: String + get() = "fail" + + override val testDelegated: String + get() = "K" +} + +class TestClass(val foo: Test) : Test by foo + +fun box(): String { + val testClass = TestClass(Delegate()) + return testClass.test + testClass.testDelegated +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt new file mode 100644 index 00000000000..1e95990ff38 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt @@ -0,0 +1,35 @@ +// !JVM_DEFAULT_MODE: all-compatibility +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_RUNTIME + +// FILE: 1.kt +interface Test { + @JvmDefault + fun test(): String { + return "O" + } + + fun delegatedTest(): String { + return "fail" + } +} + +class Delegate : Test { + override fun test(): String { + return "Fail" + } + + override fun delegatedTest(): String { + return "K" + } +} + +// FILE: 2.kt +class TestClass(val foo: Test) : Test by foo + +fun box(): String { + val testClass = TestClass(Delegate()) + return testClass.test() + testClass.delegatedTest() +} diff --git a/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt new file mode 100644 index 00000000000..ae20669911f --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt @@ -0,0 +1,32 @@ +// !JVM_DEFAULT_MODE: all-compatibility +// IGNORE_BACKEND_FIR: JVM_IR +// TARGET_BACKEND: JVM +// JVM_TARGET: 1.8 +// WITH_RUNTIME + +// FILE: 1.kt +interface Test { + @JvmDefault + val test: String + get() = "O" + + val testDelegated: String + get() = "fail" + +} + +class Delegate : Test { + override val test: String + get() = "fail" + + override val testDelegated: String + get() = "K" +} + +// FILE: 2.kt +class TestClass(val foo: Test) : Test by foo + +fun box(): String { + val testClass = TestClass(Delegate()) + return testClass.test + testClass.testDelegated +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index f93caa8d809..6ce6c3ec43a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -16272,6 +16272,29 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @@ -16506,6 +16529,29 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java index f086a95ff7e..1772e5c439d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java @@ -458,6 +458,29 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl public void testSuperPropAccessFromInterface2() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index e6c1b9f98c9..b262b630876 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -16272,6 +16272,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @@ -16506,6 +16529,29 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 40bce6a71b7..d9778600e2b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -15057,6 +15057,29 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @@ -15291,6 +15314,29 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testSimpleFunction() throws Exception { runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/simpleFunction.kt"); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java index de862a26456..f4edb51cb5d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java @@ -453,6 +453,29 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile public void testSuperPropAccessFromInterface2() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt"); } + + @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simple.kt"); + } + + @TestMetadata("simpleProperty.kt") + public void testSimpleProperty() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/delegationBy/simpleProperty.kt"); + } + } } @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop") 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 880ad667c5b..57a92b684a8 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 @@ -12612,6 +12612,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { public void testAllFilesPresentInAllCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @@ -12651,6 +12664,19 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { public void testAllFilesPresentInNoDefaultImpls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractIrJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation") 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 2955d2c05eb..657d6a58d76 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 @@ -12677,6 +12677,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { public void testAllFilesPresentInAllCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/allCompatibility/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/compatibility") @@ -12716,6 +12729,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { public void testAllFilesPresentInNoDefaultImpls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + + @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegationBy extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDelegationBy() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvm8/defaults/noDefaultImpls/delegationBy"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); + } + } } @TestMetadata("compiler/testData/codegen/box/jvm8/defaults/noDelegation")