Supported propagating read-onliness.

#KT-2776 in progress
This commit is contained in:
Evgeny Gerashchenko
2012-11-12 15:37:57 +04:00
parent 89b413b7ad
commit 044487cf37
13 changed files with 264 additions and 2 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 InheritReadOnlinessOfArgument {
@KotlinSignature("fun foo(): List<List<String>>>")
public List<List<String>> foo() {
throw new UnsupportedOperationException();
}
public class Sub extends InheritReadOnlinessOfArgument {
public List<List<String>> foo() {
throw new UnsupportedOperationException();
}
}
}
@@ -0,0 +1,11 @@
package test
import org.jetbrains.annotations.NotNull
public open class InheritReadOnlinessOfArgument : java.lang.Object() {
public open fun foo(): List<List<String>> = throw UnsupportedOperationException()
public open class Sub: InheritReadOnlinessOfArgument() {
override fun foo(): List<List<String>> = throw UnsupportedOperationException()
}
}
@@ -0,0 +1,10 @@
namespace test
public open class test.InheritReadOnlinessOfArgument : java.lang.Object {
public final /*constructor*/ fun <init>(): test.InheritReadOnlinessOfArgument
public open fun foo(): jet.List<jet.List<jet.String>>
public open class test.InheritReadOnlinessOfArgument.Sub : test.InheritReadOnlinessOfArgument {
public final /*constructor*/ fun <init>(): test.InheritReadOnlinessOfArgument.Sub
public open override /*1*/ fun foo(): jet.List<jet.List<jet.String>>
}
}
@@ -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 InheritReadOnlinessSameClass {
@KotlinSignature("fun foo(): List<String>")
public List<String> foo() {
throw new UnsupportedOperationException();
}
public class Sub extends InheritReadOnlinessSameClass {
public List<String> foo() {
throw new UnsupportedOperationException();
}
}
}
@@ -0,0 +1,11 @@
package test
import org.jetbrains.annotations.NotNull
public open class InheritReadOnlinessSameClass : java.lang.Object() {
public open fun foo(): List<String> = throw UnsupportedOperationException()
public open class Sub: InheritReadOnlinessSameClass() {
override fun foo(): List<String> = throw UnsupportedOperationException()
}
}
@@ -0,0 +1,10 @@
namespace test
public open class test.InheritReadOnlinessSameClass : java.lang.Object {
public final /*constructor*/ fun <init>(): test.InheritReadOnlinessSameClass
public open fun foo(): jet.List<jet.String>
public open class test.InheritReadOnlinessSameClass.Sub : test.InheritReadOnlinessSameClass {
public final /*constructor*/ fun <init>(): test.InheritReadOnlinessSameClass.Sub
public open override /*1*/ fun foo(): jet.List<jet.String>
}
}
@@ -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 InheritReadOnlinessSubclass {
@KotlinSignature("fun foo(): Collection<String>")
public Collection<String> foo() {
throw new UnsupportedOperationException();
}
public class Sub extends InheritReadOnlinessSubclass {
public List<String> foo() {
throw new UnsupportedOperationException();
}
}
}
@@ -0,0 +1,11 @@
package test
import org.jetbrains.annotations.NotNull
public open class InheritReadOnlinessSubclass : java.lang.Object() {
public open fun foo(): Collection<String> = throw UnsupportedOperationException()
public open class Sub: InheritReadOnlinessSubclass() {
override fun foo(): List<String> = throw UnsupportedOperationException()
}
}
@@ -0,0 +1,10 @@
namespace test
public open class test.InheritReadOnlinessSubclass : java.lang.Object {
public final /*constructor*/ fun <init>(): test.InheritReadOnlinessSubclass
public open fun foo(): jet.Collection<jet.String>
public open class test.InheritReadOnlinessSubclass.Sub : test.InheritReadOnlinessSubclass {
public final /*constructor*/ fun <init>(): test.InheritReadOnlinessSubclass.Sub
public open override /*1*/ fun foo(): jet.List<jet.String>
}
}