Introduced simple propagation of nullability on loading Java.
#KT-2776 in progress
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class AddNotNullJavaSubtype {
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public class Sub extends AddNotNullJavaSubtype {
|
||||
@NotNull
|
||||
public String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public open class AddNotNullJavaSubtype : java.lang.Object() {
|
||||
public open fun foo(): CharSequence? = throw UnsupportedOperationException()
|
||||
|
||||
public open class Sub: AddNotNullJavaSubtype() {
|
||||
override fun foo(): String = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public open class test.AddNotNullJavaSubtype : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.AddNotNullJavaSubtype
|
||||
public open fun foo(): jet.CharSequence?
|
||||
public open class test.AddNotNullJavaSubtype.Sub : test.AddNotNullJavaSubtype {
|
||||
public final /*constructor*/ fun <init>(): test.AddNotNullJavaSubtype.Sub
|
||||
public open override /*1*/ fun foo(): jet.String
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class AddNotNullSameJavaType {
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public class Sub extends AddNotNullSameJavaType {
|
||||
@NotNull
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public open class AddNotNullSameJavaType : java.lang.Object() {
|
||||
public open fun foo(): CharSequence? = throw UnsupportedOperationException()
|
||||
|
||||
public open class Sub: AddNotNullSameJavaType() {
|
||||
override fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public open class test.AddNotNullSameJavaType : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.AddNotNullSameJavaType
|
||||
public open fun foo(): jet.CharSequence?
|
||||
public open class test.AddNotNullSameJavaType.Sub : test.AddNotNullSameJavaType {
|
||||
public final /*constructor*/ fun <init>(): test.AddNotNullSameJavaType.Sub
|
||||
public open override /*1*/ fun foo(): jet.CharSequence
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class AddNullabilityJavaSubtype {
|
||||
@NotNull
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public class Sub extends AddNullabilityJavaSubtype {
|
||||
@KotlinSignature("fun String? foo()")
|
||||
public String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public open class AddNullabilityJavaSubtype : java.lang.Object() {
|
||||
public open fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
|
||||
public open class Sub: AddNullabilityJavaSubtype() {
|
||||
override fun foo(): String = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public open class test.AddNullabilityJavaSubtype : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.AddNullabilityJavaSubtype
|
||||
public open fun foo(): jet.CharSequence
|
||||
public open class test.AddNullabilityJavaSubtype.Sub : test.AddNullabilityJavaSubtype {
|
||||
public final /*constructor*/ fun <init>(): test.AddNullabilityJavaSubtype.Sub
|
||||
public open override /*1*/ fun foo(): jet.String
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class AddNullabilitySameJavaType {
|
||||
@NotNull
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public class Sub extends AddNullabilitySameJavaType {
|
||||
@KotlinSignature("fun CharSequence? foo()")
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public open class AddNullabilitySameJavaType : java.lang.Object() {
|
||||
public open fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
|
||||
public open class Sub: AddNullabilitySameJavaType() {
|
||||
override fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public open class test.AddNullabilitySameJavaType : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.AddNullabilitySameJavaType
|
||||
public open fun foo(): jet.CharSequence
|
||||
public open class test.AddNullabilitySameJavaType.Sub : test.AddNullabilitySameJavaType {
|
||||
public final /*constructor*/ fun <init>(): test.AddNullabilitySameJavaType.Sub
|
||||
public open override /*1*/ fun foo(): jet.CharSequence
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class InheritNullabilityJavaSubtype {
|
||||
@NotNull
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public class Sub extends InheritNullabilityJavaSubtype {
|
||||
public String foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public open class InheritNullabilityJavaSubtype : java.lang.Object() {
|
||||
public open fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
|
||||
public open class Sub: InheritNullabilityJavaSubtype() {
|
||||
override fun foo(): String = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public open class test.InheritNullabilityJavaSubtype : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.InheritNullabilityJavaSubtype
|
||||
public open fun foo(): jet.CharSequence
|
||||
public open class test.InheritNullabilityJavaSubtype.Sub : test.InheritNullabilityJavaSubtype {
|
||||
public final /*constructor*/ fun <init>(): test.InheritNullabilityJavaSubtype.Sub
|
||||
public open override /*1*/ fun foo(): jet.String
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
|
||||
public class InheritNullabilitySameJavaType {
|
||||
@NotNull
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public class Sub extends InheritNullabilitySameJavaType {
|
||||
public CharSequence foo() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
public open class InheritNullabilitySameJavaType : java.lang.Object() {
|
||||
public open fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
|
||||
public open class Sub: InheritNullabilitySameJavaType() {
|
||||
override fun foo(): CharSequence = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public open class test.InheritNullabilitySameJavaType : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.InheritNullabilitySameJavaType
|
||||
public open fun foo(): jet.CharSequence
|
||||
public open class test.InheritNullabilitySameJavaType.Sub : test.InheritNullabilitySameJavaType {
|
||||
public final /*constructor*/ fun <init>(): test.InheritNullabilitySameJavaType.Sub
|
||||
public open override /*1*/ fun foo(): jet.CharSequence
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user