Supported generic subclasses in submethods.
#KT-2776 in progress
This commit is contained in:
+20
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -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()
|
||||
}
|
||||
}
|
||||
+10
@@ -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>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user