Changing default nullability for type arguments to NotNull
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package test
|
||||
|
||||
public class ArrayTypeVariance : java.lang.Object() {
|
||||
public fun toArray(p0: Array<out Any?>?): Array<Any?>? {
|
||||
public fun toArray(p0: Array<out Any>?): Array<Any>? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public final class test.ArrayTypeVariance : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.ArrayTypeVariance
|
||||
public final fun toArray(/*0*/ p0: jet.Array<out jet.Any?>?): jet.Array<jet.Any?>?
|
||||
public final fun toArray(/*0*/ p0: jet.Array<out jet.Any>?): jet.Array<jet.Any>?
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
public open class FieldOfArrayType() : java.lang.Object() {
|
||||
public var files: Array<java.io.File?>? = null
|
||||
public var files: Array<java.io.File>? = null
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.FieldOfArrayType : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.FieldOfArrayType
|
||||
public final var files: jet.Array<java.io.File?>?
|
||||
public final var files: jet.Array<java.io.File>?
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongReturnTypeStructure : Object() {
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String?, String?>?>?) : String? = ""
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String, String>>?) : String? = ""
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongReturnTypeStructure : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongReturnTypeStructure
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List<jet.Map.Entry<jet.String?, jet.String?>?>?): jet.String?
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List<jet.Map.Entry<jet.String, jet.String>>?): jet.String?
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParameterBoundStructure1 : Object() {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<B>?) where B : List<Cloneable?>? {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<B>?) where B : List<Cloneable>? {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongTypeParameterBoundStructure1 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeParameterBoundStructure1
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable?>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<B>?): jet.Tuple0
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<B>?): jet.Tuple0
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongTypeParameterBoundStructure2 {
|
||||
@ExpectLoadError("'jet.List<java.lang.Cloneable?>?' type in method signature has 1 type arguments, while 'List' in alternative signature has 0 of them")
|
||||
@ExpectLoadError("'jet.List<java.lang.Cloneable>?' type in method signature has 1 type arguments, while 'List' in alternative signature has 0 of them")
|
||||
@KotlinSignature("fun <A, B : Runnable> foo(a : A, b : List<B>) where B : List")
|
||||
public <A, B extends Runnable & List<Cloneable>> void foo(A a, List<? extends B> b) {
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeParameterBoundStructure2 : Object() {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<B>?) where B : List<Cloneable?>? {
|
||||
public open fun <erased A, erased B : Runnable?> foo(p0 : A?, p1 : List<B>?) where B : List<Cloneable>? {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongTypeParameterBoundStructure2 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeParameterBoundStructure2
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable?>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<B>?): jet.Tuple0
|
||||
public open fun </*0*/ A : jet.Any?, /*1*/ B : java.lang.Runnable? & jet.List<java.lang.Cloneable>?>foo(/*0*/ p0: A?, /*1*/ p1: jet.List<B>?): jet.Tuple0
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongTypeVariance : Object() {
|
||||
public open fun copy(p0 : Array<out Number?>?, p1 : Array<out Number?>?) : MutableList<Number?>? {
|
||||
public open fun copy(p0 : Array<out Number>?, p1 : Array<out Number>?) : MutableList<Number>? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongTypeVariance : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongTypeVariance
|
||||
public open fun copy(/*0*/ p0: jet.Array<out jet.Number?>?, /*1*/ p1: jet.Array<out jet.Number?>?): jet.MutableList<jet.Number?>?
|
||||
public open fun copy(/*0*/ p0: jet.Array<out jet.Number>?, /*1*/ p1: jet.Array<out jet.Number>?): jet.MutableList<jet.Number>?
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongValueParameterStructure1 : Object() {
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String?, String?>?>?) : String? = ""
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String, String>>?) : String? = ""
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongValueParameterStructure1 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongValueParameterStructure1
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List<jet.Map.Entry<jet.String?, jet.String?>?>?): jet.String?
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List<jet.Map.Entry<jet.String, jet.String>>?): jet.String?
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public class WrongValueParameterStructure2 {
|
||||
@ExpectLoadError("'jet.Map.Entry<jet.String?, jet.String?>?' type in method signature has 2 type arguments, while 'Map.Entry<String?>' in alternative signature has 1 of them")
|
||||
@ExpectLoadError("'jet.Map.Entry<jet.String, jet.String>' type in method signature has 2 type arguments, while 'Map.Entry<String?>' in alternative signature has 1 of them")
|
||||
@KotlinSignature("fun foo(a : String, b : List<Map.Entry<String?>?>) : String")
|
||||
public String foo(String a, List<Map.Entry<String, String>> b) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
@@ -3,5 +3,5 @@ package test
|
||||
import java.util.*
|
||||
|
||||
public open class WrongValueParameterStructure2 : Object() {
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String?, String?>?>?) : String? = ""
|
||||
public open fun foo(p0 : String?, p1 : List<Map.Entry<String, String>>?) : String? = ""
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ namespace test
|
||||
|
||||
public open class test.WrongValueParameterStructure2 : java.lang.Object {
|
||||
public final /*constructor*/ fun <init>(): test.WrongValueParameterStructure2
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List<jet.Map.Entry<jet.String?, jet.String?>?>?): jet.String?
|
||||
public open fun foo(/*0*/ p0: jet.String?, /*1*/ p1: jet.List<jet.Map.Entry<jet.String, jet.String>>?): jet.String?
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package test
|
||||
public trait InheritNotVararg: Object {
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(p0: Array<out String?>?)
|
||||
public fun foo(p0: Array<out String>?)
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(p0: Array<out String?>?)
|
||||
override fun foo(p0: Array<out String>?)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ namespace test
|
||||
|
||||
public abstract trait test.InheritNotVararg : java.lang.Object {
|
||||
public abstract trait test.InheritNotVararg.Sub : test.InheritNotVararg.Super {
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.Array<out jet.String?>?): jet.Tuple0
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.Array<out jet.String>?): jet.Tuple0
|
||||
}
|
||||
public abstract trait test.InheritNotVararg.Super : java.lang.Object {
|
||||
public abstract fun foo(/*0*/ p0: jet.Array<out jet.String?>?): jet.Tuple0
|
||||
public abstract fun foo(/*0*/ p0: jet.Array<out jet.String>?): jet.Tuple0
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package test
|
||||
public trait InheritNotVarargInteger: Object {
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(p0: Array<out Int?>?)
|
||||
public fun foo(p0: Array<out Int>?)
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(p0: Array<out Int?>?)
|
||||
override fun foo(p0: Array<out Int>?)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ namespace test
|
||||
|
||||
public abstract trait test.InheritNotVarargInteger : java.lang.Object {
|
||||
public abstract trait test.InheritNotVarargInteger.Sub : test.InheritNotVarargInteger.Super {
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.Array<out jet.Int?>?): jet.Tuple0
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.Array<out jet.Int>?): jet.Tuple0
|
||||
}
|
||||
public abstract trait test.InheritNotVarargInteger.Super : java.lang.Object {
|
||||
public abstract fun foo(/*0*/ p0: jet.Array<out jet.Int?>?): jet.Tuple0
|
||||
public abstract fun foo(/*0*/ p0: jet.Array<out jet.Int>?): jet.Tuple0
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ public interface AddNullabilitySameGenericType1 {
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
@ExpectLoadError("Auto type 'jet.String' is not-null, while type in alternative signature is nullable: 'String?'")
|
||||
@ExpectLoadError("Return type is changed to not subtype for method which overrides another: MutableList<String?>, was: MutableList<String>")
|
||||
@KotlinSignature("fun foo(): MutableList<String?>")
|
||||
List<String> foo();
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ public interface HalfSubstitutedTypeParameters {
|
||||
public interface TrickyList<X, E> extends List<E> {}
|
||||
|
||||
public interface Super {
|
||||
@KotlinSignature("fun foo(): MutableList<String>")
|
||||
@KotlinSignature("fun foo(): MutableList<String?>")
|
||||
List<String> foo();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -5,10 +5,10 @@ public trait HalfSubstitutedTypeParameters: Object {
|
||||
public trait TrickyList<X, E>: MutableList<E> {}
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(): MutableList<String>
|
||||
public fun foo(): MutableList<String?>
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(): TrickyList<Int?, String>
|
||||
override fun foo(): TrickyList<Int, String?>
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@ namespace test
|
||||
|
||||
public abstract trait test.HalfSubstitutedTypeParameters : java.lang.Object {
|
||||
public abstract trait test.HalfSubstitutedTypeParameters.Sub : test.HalfSubstitutedTypeParameters.Super {
|
||||
public abstract override /*1*/ fun foo(): test.HalfSubstitutedTypeParameters.TrickyList<jet.Int?, jet.String>
|
||||
public abstract override /*1*/ fun foo(): test.HalfSubstitutedTypeParameters.TrickyList<jet.Int, jet.String?>
|
||||
}
|
||||
public abstract trait test.HalfSubstitutedTypeParameters.Super : java.lang.Object {
|
||||
public abstract fun foo(): jet.MutableList<jet.String>
|
||||
public abstract fun foo(): jet.MutableList<jet.String?>
|
||||
}
|
||||
public abstract trait test.HalfSubstitutedTypeParameters.TrickyList</*0*/ X : jet.Any?, /*1*/ E : jet.Any?> : jet.MutableList<E> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E): jet.Boolean
|
||||
|
||||
Reference in New Issue
Block a user