Change default upper bound of Java type parameters to Any!
#KT-7672 Fixed
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
public open class ConstructorWithNewTypeParams</*0*/ T> {
|
||||
public constructor ConstructorWithNewTypeParams</*0*/ T>(/*0*/ first: kotlin.Any!)
|
||||
public open class ConstructorWithNewTypeParams</*0*/ T : kotlin.Any!> {
|
||||
public constructor ConstructorWithNewTypeParams</*0*/ T : kotlin.Any!>(/*0*/ first: kotlin.Any!)
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
package test
|
||||
|
||||
public open class ConstructorWithParentTypeParams</*0*/ T> {
|
||||
public constructor ConstructorWithParentTypeParams</*0*/ T>(/*0*/ first: T!)
|
||||
public open class ConstructorWithParentTypeParams</*0*/ T : kotlin.Any!> {
|
||||
public constructor ConstructorWithParentTypeParams</*0*/ T : kotlin.Any!>(/*0*/ first: T!)
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ package test
|
||||
|
||||
public open class MethodWithMappedClasses {
|
||||
public constructor MethodWithMappedClasses()
|
||||
public open fun </*0*/ T> copy(/*0*/ dest: (kotlin.MutableList<in T!>..kotlin.List<*>?), /*1*/ src: kotlin.(Mutable)List<T!>!): kotlin.Unit
|
||||
public open fun </*0*/ T : kotlin.Any!> copy(/*0*/ dest: (kotlin.MutableList<in T!>..kotlin.List<*>?), /*1*/ src: kotlin.(Mutable)List<T!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ package test
|
||||
|
||||
public open class MethodWithTypeParameters {
|
||||
public constructor MethodWithTypeParameters()
|
||||
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?), /*2*/ c: (kotlin.MutableList<in kotlin.String!>..kotlin.List<*>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
|
||||
public open fun </*0*/ A : kotlin.Any!, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?), /*2*/ c: (kotlin.MutableList<in kotlin.String!>..kotlin.List<*>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package test
|
||||
|
||||
public open class PropertyArrayTypes</*0*/ T> {
|
||||
public constructor PropertyArrayTypes</*0*/ T>()
|
||||
public open class PropertyArrayTypes</*0*/ T : kotlin.Any!> {
|
||||
public constructor PropertyArrayTypes</*0*/ T : kotlin.Any!>()
|
||||
public final var array: kotlin.Array<(out) kotlin.String!>!
|
||||
public final var arrayOfArrays: kotlin.Array<(out) kotlin.Array<(out) kotlin.String!>!>!
|
||||
public final var genericArray: kotlin.Array<(out) T!>!
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package test
|
||||
|
||||
public open class PropertyComplexTypes</*0*/ T> {
|
||||
public constructor PropertyComplexTypes</*0*/ T>()
|
||||
public open class PropertyComplexTypes</*0*/ T : kotlin.Any!> {
|
||||
public constructor PropertyComplexTypes</*0*/ T : kotlin.Any!>()
|
||||
public final var genericType: T!
|
||||
public final var listDefinedGeneric: java.util.ArrayList<kotlin.String!>!
|
||||
public final var listGeneric: java.util.ArrayList<T!>!
|
||||
|
||||
Vendored
+1
-1
@@ -2,5 +2,5 @@ package test
|
||||
|
||||
public open class WrongTypeParameterBoundStructure1 {
|
||||
public constructor WrongTypeParameterBoundStructure1()
|
||||
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
|
||||
public open fun </*0*/ A : kotlin.Any!, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -2,5 +2,5 @@ package test
|
||||
|
||||
public open class WrongTypeParameterBoundStructure2 {
|
||||
public constructor WrongTypeParameterBoundStructure2()
|
||||
public open fun </*0*/ A, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
|
||||
public open fun </*0*/ A : kotlin.Any!, /*1*/ B : java.lang.Runnable!> foo(/*0*/ a: A!, /*1*/ b: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit where B : kotlin.(Mutable)List<kotlin.Cloneable!>!
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ package test
|
||||
|
||||
public open class WrongTypeParametersCount {
|
||||
public constructor WrongTypeParametersCount()
|
||||
public open fun </*0*/ A, /*1*/ B> foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit
|
||||
public open fun </*0*/ A : kotlin.Any!, /*1*/ B : kotlin.Any!> foo(/*0*/ p0: A!, /*1*/ p1: (kotlin.MutableList<out B!>..kotlin.List<B!>?)): kotlin.Unit
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public interface DeeplySubstitutedClassParameter {
|
||||
|
||||
public interface Middle</*0*/ E> : test.DeeplySubstitutedClassParameter.Super<E!> {
|
||||
public interface Middle</*0*/ E : kotlin.Any!> : test.DeeplySubstitutedClassParameter.Super<E!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ fun foo(/*0*/ t: E!): kotlin.Unit
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter {
|
||||
public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ t: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public interface DeeplySubstitutedClassParameter2 {
|
||||
|
||||
public interface Middle</*0*/ E> : test.DeeplySubstitutedClassParameter2.Super<E!> {
|
||||
public interface Middle</*0*/ E : kotlin.Any!> : test.DeeplySubstitutedClassParameter2.Super<E!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ t: E!): kotlin.Unit
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter2 {
|
||||
public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ t: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ public interface Kt3302 {
|
||||
public abstract override /*2*/ fun put(/*0*/ key: kotlin.String, /*1*/ value: kotlin.Any): kotlin.Any!
|
||||
}
|
||||
|
||||
public interface LinkedHashMap</*0*/ K, /*1*/ V> {
|
||||
public interface LinkedHashMap</*0*/ K : kotlin.Any!, /*1*/ V : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun put(/*0*/ key: K!, /*1*/ value: V!): V!
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,13 +2,13 @@ package test
|
||||
|
||||
public interface OverrideWithErasedParameter {
|
||||
|
||||
public interface Sub</*0*/ T> : test.OverrideWithErasedParameter.Super<T!> {
|
||||
public interface Sub</*0*/ T : kotlin.Any!> : test.OverrideWithErasedParameter.Super<T!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: T!): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: kotlin.Any!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ p0: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public interface SubclassFromGenericAndNot {
|
||||
|
||||
public interface Generic</*0*/ T> {
|
||||
public interface Generic</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ key: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ public interface SubstitutedClassParameter {
|
||||
public abstract override /*1*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ t: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,12 +7,12 @@ public interface SubstitutedClassParameters {
|
||||
public abstract override /*2*/ fun foo(/*0*/ t: kotlin.String!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super1</*0*/ T> {
|
||||
public interface Super1</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ t: T!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super2</*0*/ E> {
|
||||
public interface Super2</*0*/ E : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(/*0*/ t: E!): kotlin.Unit
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public interface DeeplySubstitutedClassParameter {
|
||||
|
||||
public interface Middle</*0*/ E> : test.DeeplySubstitutedClassParameter.Super<E!> {
|
||||
public interface Middle</*0*/ E : kotlin.Any!> : test.DeeplySubstitutedClassParameter.Super<E!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ fun foo(): E!
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter {
|
||||
public abstract override /*1*/ fun foo(): kotlin.String!
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): T!
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public interface DeeplySubstitutedClassParameter2 {
|
||||
|
||||
public interface Middle</*0*/ E> : test.DeeplySubstitutedClassParameter2.Super<E!> {
|
||||
public interface Middle</*0*/ E : kotlin.Any!> : test.DeeplySubstitutedClassParameter2.Super<E!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(): E!
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public interface DeeplySubstitutedClassParameter2 {
|
||||
public abstract override /*1*/ fun foo(): kotlin.String!
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): T!
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ public interface HalfSubstitutedTypeParameters {
|
||||
public abstract fun foo(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
}
|
||||
|
||||
public interface TrickyList</*0*/ X, /*1*/ E> : kotlin.MutableList<E!> {
|
||||
public interface TrickyList</*0*/ X : kotlin.Any!, /*1*/ E : kotlin.Any!> : kotlin.MutableList<E!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E!): kotlin.Boolean
|
||||
public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: E!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection<E!>): kotlin.Boolean
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public interface SubclassFromGenericAndNot {
|
||||
|
||||
public interface Generic</*0*/ T> {
|
||||
public interface Generic</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): T!
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
public interface SubclassOfCollection</*0*/ E> : kotlin.MutableCollection<E!> {
|
||||
public interface SubclassOfCollection</*0*/ E : kotlin.Any!> : kotlin.MutableCollection<E!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E!): kotlin.Boolean
|
||||
public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection<E!>): kotlin.Boolean
|
||||
public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
package test
|
||||
|
||||
public interface SubclassOfMapEntry</*0*/ K, /*1*/ V> : kotlin.MutableMap.MutableEntry<K!, V!> {
|
||||
public interface SubclassOfMapEntry</*0*/ K : kotlin.Any!, /*1*/ V : kotlin.Any!> : kotlin.MutableMap.MutableEntry<K!, V!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun getKey(): K!
|
||||
public abstract override /*1*/ /*fake_override*/ fun getValue(): V!
|
||||
public abstract override /*1*/ fun setValue(/*0*/ value: V!): V!
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ public interface SubstitutedClassParameter {
|
||||
public abstract override /*1*/ fun foo(): kotlin.String!
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): T!
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,12 +7,12 @@ public interface SubstitutedClassParameters {
|
||||
public abstract override /*2*/ fun foo(): kotlin.String!
|
||||
}
|
||||
|
||||
public interface Super1</*0*/ T> {
|
||||
public interface Super1</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): T!
|
||||
}
|
||||
|
||||
public interface Super2</*0*/ E> {
|
||||
public interface Super2</*0*/ E : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
public abstract fun foo(): E!
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -2,12 +2,12 @@ package test
|
||||
|
||||
public interface TypeParamOfClass {
|
||||
|
||||
public interface Sub</*0*/ T> : test.TypeParamOfClass.Super<T!> {
|
||||
public interface Sub</*0*/ T : kotlin.Any!> : test.TypeParamOfClass.Super<T!> {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ fun foo(): T!
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
org.jetbrains.annotations.NotNull() public abstract fun foo(): T
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ public interface TypeParamOfClassSubstituted {
|
||||
public abstract override /*1*/ fun foo(): kotlin.String!
|
||||
}
|
||||
|
||||
public interface Super</*0*/ T> {
|
||||
public interface Super</*0*/ T : kotlin.Any!> {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
org.jetbrains.annotations.NotNull() public abstract fun foo(): T
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -4,11 +4,11 @@ public interface TypeParamOfFun {
|
||||
|
||||
public interface Sub : test.TypeParamOfFun.Super {
|
||||
public abstract override /*1*/ /*fake_override*/ fun dummy(): kotlin.Unit
|
||||
public abstract override /*1*/ fun </*0*/ E> foo(): E
|
||||
public abstract override /*1*/ fun </*0*/ E : kotlin.Any!> foo(): E
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public abstract fun dummy(): kotlin.Unit
|
||||
org.jetbrains.annotations.NotNull() public abstract fun </*0*/ T> foo(): T
|
||||
org.jetbrains.annotations.NotNull() public abstract fun </*0*/ T : kotlin.Any!> foo(): T
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package test
|
||||
public interface UseParameterAsUpperBound {
|
||||
|
||||
public interface Sub : test.UseParameterAsUpperBound.Super {
|
||||
public abstract override /*1*/ fun </*0*/ B, /*1*/ A : B!> foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit
|
||||
public abstract override /*1*/ fun </*0*/ B : kotlin.Any!, /*1*/ A : B!> foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public abstract fun </*0*/ A, /*1*/ B : A!> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit
|
||||
public abstract fun </*0*/ A : kotlin.Any!, /*1*/ B : A!> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package test
|
||||
public interface UseParameterInUpperBound {
|
||||
|
||||
public interface Sub : test.UseParameterInUpperBound.Super {
|
||||
public abstract override /*1*/ fun </*0*/ B, /*1*/ A : kotlin.(Mutable)List<B!>!> foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit
|
||||
public abstract override /*1*/ fun </*0*/ B : kotlin.Any!, /*1*/ A : kotlin.(Mutable)List<B!>!> foo(/*0*/ a: B!, /*1*/ b: A!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public abstract fun </*0*/ A, /*1*/ B : kotlin.(Mutable)List<A!>!> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit
|
||||
public abstract fun </*0*/ A : kotlin.Any!, /*1*/ B : kotlin.(Mutable)List<A!>!> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package test
|
||||
public interface UseParameterInUpperBoundWithKotlinSignature {
|
||||
|
||||
public interface Sub : test.UseParameterInUpperBoundWithKotlinSignature.Super {
|
||||
public abstract override /*1*/ fun </*0*/ B, /*1*/ A : kotlin.(Mutable)List<B!>!> foo(/*0*/ b: B!, /*1*/ a: A!): kotlin.Unit
|
||||
public abstract override /*1*/ fun </*0*/ B : kotlin.Any!, /*1*/ A : kotlin.(Mutable)List<B!>!> foo(/*0*/ b: B!, /*1*/ a: A!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface Super {
|
||||
public abstract fun </*0*/ A, /*1*/ B : kotlin.(Mutable)List<A!>!> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit
|
||||
public abstract fun </*0*/ A : kotlin.Any!, /*1*/ B : kotlin.(Mutable)List<A!>!> foo(/*0*/ a: A!, /*1*/ b: B!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user