Supported generic subclasses in submethods.

#KT-2776 in progress
This commit is contained in:
Evgeny Gerashchenko
2012-11-09 17:11:19 +04:00
parent e2d213f1fd
commit 89b413b7ad
7 changed files with 111 additions and 18 deletions
@@ -0,0 +1,20 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Collection;
import jet.runtime.typeinfo.KotlinSignature;
public class InheritNullabilityGenericSubclassSimple {
@KotlinSignature("fun foo(): MutableCollection<String>")
public Collection<String> foo() {
throw new UnsupportedOperationException();
}
public class Sub extends InheritNullabilityGenericSubclassSimple {
public List<String> foo() {
throw new UnsupportedOperationException();
}
}
}
@@ -0,0 +1,11 @@
package test
import org.jetbrains.annotations.NotNull
public open class InheritNullabilityGenericSubclassSimple : java.lang.Object() {
public open fun foo(): MutableCollection<String> = throw UnsupportedOperationException()
public open class Sub: InheritNullabilityGenericSubclassSimple() {
override fun foo(): MutableList<String> = throw UnsupportedOperationException()
}
}
@@ -0,0 +1,10 @@
namespace test
public open class test.InheritNullabilityGenericSubclassSimple : java.lang.Object {
public final /*constructor*/ fun <init>(): test.InheritNullabilityGenericSubclassSimple
public open fun foo(): jet.MutableCollection<jet.String>
public open class test.InheritNullabilityGenericSubclassSimple.Sub : test.InheritNullabilityGenericSubclassSimple {
public final /*constructor*/ fun <init>(): test.InheritNullabilityGenericSubclassSimple.Sub
public open override /*1*/ fun foo(): jet.MutableList<jet.String>
}
}