diff --git a/compiler/testData/loadJava/compiledJava/InnerOfGeneric.java b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.java new file mode 100644 index 00000000000..3250b9f62c7 --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.java @@ -0,0 +1,23 @@ +package test; + +import java.util.Iterator; + +public class InnerOfGeneric { + public interface S { + Iterator iterator(); + } + + public abstract class A { + public abstract class Inner implements S { + } + } + + public class B extends A { + public class SubInner extends Inner { + @Override + public Iterator iterator() { + throw new RuntimeException(); + } + } + } +} diff --git a/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt new file mode 100644 index 00000000000..d5f746a55ee --- /dev/null +++ b/compiler/testData/loadJava/compiledJava/InnerOfGeneric.txt @@ -0,0 +1,31 @@ +package test + +public open class InnerOfGeneric : java.lang.Object { + public constructor InnerOfGeneric() + + public abstract inner class A : java.lang.Object { + public constructor A() + + public abstract inner class Inner : test.InnerOfGeneric.S { + public constructor Inner() + public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator? + } + } + + public open inner class B : test.InnerOfGeneric.A { + public constructor B() + + public open inner class SubInner : test.InnerOfGeneric.A.Inner { + public constructor SubInner() + public open override /*1*/ fun iterator(): kotlin.MutableIterator? + } + } + + public trait S : java.lang.Object { + public abstract fun iterator(): kotlin.MutableIterator? + } +} + +package test.InnerOfGeneric { + public /*synthesized*/ fun S(/*0*/ function: () -> kotlin.MutableIterator?): test.InnerOfGeneric.S +} diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java index 299b95236c4..21cffd3d788 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java @@ -44,6 +44,11 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { doTestCompiledJava("compiler/testData/loadJava/compiledJava/EnumMembers.java"); } + @TestMetadata("InnerOfGeneric.java") + public void testInnerOfGeneric() throws Exception { + doTestCompiledJava("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); + } + @TestMetadata("JavaEnum.java") public void testJavaEnum() throws Exception { doTestCompiledJava("compiler/testData/loadJava/compiledJava/JavaEnum.java");