diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/expected.txt b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/expected.txt new file mode 100644 index 00000000000..b826f846731 --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/expected.txt @@ -0,0 +1,31 @@ +package test + +public open class A { + public constructor A() + public open fun foo() : jet.String +} + +public open class B : test.A { + public constructor B() + public open override /*1*/ fun foo() : jet.String +} + +public open class C : test.B { + public constructor C() + public open override /*1*/ fun foo() : jet.String +} + +public open class D : test.C { + public constructor D() + public open override /*1*/ fun foo() : jet.String +} + +public open class E : test.D { + public constructor E() + public open override /*1*/ fun foo() : jet.String +} + +public open class F : test.E { + public constructor F() + public open override /*1*/ fun foo() : jet.String +} diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/B.java b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/B.java new file mode 100644 index 00000000000..fdc28ea873f --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/B.java @@ -0,0 +1,7 @@ +package test; + +public class B extends A { + public String foo() { + return ""; + } +} diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/D.java b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/D.java new file mode 100644 index 00000000000..3c283210507 --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/D.java @@ -0,0 +1,7 @@ +package test; + +public class D extends C { + public String foo() { + return ""; + } +} diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/F.java b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/F.java new file mode 100644 index 00000000000..c62d154040d --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/java/test/F.java @@ -0,0 +1,7 @@ +package test; + +public class F extends E { + public String foo() { + return ""; + } +} diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/A.kt b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/A.kt new file mode 100644 index 00000000000..e7a343dfa50 --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/A.kt @@ -0,0 +1,5 @@ +package test + +public open class A { + public open fun foo(): String = "" +} diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/C.kt b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/C.kt new file mode 100644 index 00000000000..e90063fd24f --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/C.kt @@ -0,0 +1,5 @@ +package test + +public open class C: B() { + override fun foo(): String = "" +} diff --git a/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/E.kt b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/E.kt new file mode 100644 index 00000000000..cd21ffe9333 --- /dev/null +++ b/compiler/testData/loadJavaCustom/deepSubclassingKotlinInJava/kotlin/E.kt @@ -0,0 +1,5 @@ +package test + +public open class E: D() { + override fun foo(): String = "" +} diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java index 39b2589a257..769ae6cf1e8 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaCustomTest.java @@ -139,7 +139,15 @@ public final class LoadJavaCustomTest extends KotlinTestWithEnvironment { public static class SubclassingKotlinInJavaTest extends KotlinTestWithEnvironmentManagement { public void testSubclassingKotlinInJava() throws Exception { - File dir = new File(PATH + "/subclassingKotlinInJava"); + doTest(); + } + + public void testDeepSubclassingKotlinInJava() throws Exception { + doTest(); + } + + public void doTest() throws Exception { + File dir = new File(PATH + "/" + getTestName(true)); CompilerConfiguration configuration = JetTestUtils.compilerConfigurationForTests( ConfigurationKind.JDK_ONLY, TestJdkKind.MOCK_JDK, new File(dir, "java"));