FIR: Support flexible types in getErasedVersionOfFirstUpperBound

This commit is contained in:
Denis Zharkov
2020-02-11 17:36:16 +03:00
parent 42e8017bde
commit 95b4fa4b31
23 changed files with 47 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
public final class ClassWithTypePP<P, Q : R|P?|> : R|kotlin/Any| {
public constructor<P, Q : R|P?|>(): R|test/ClassWithTypePP<P, Q>|
public final class ClassWithTypePP<P, Q : R|ft<P, P?>!|> : R|kotlin/Any| {
public constructor<P, Q : R|ft<P, P?>!|>(): R|test/ClassWithTypePP<P, Q>|
}

View File

@@ -1,4 +1,4 @@
public open class ClassWithTypePRefNext<R : R|kotlin/collections/MutableIterable<P>?|, P> : R|kotlin/Any| {
public constructor<R : R|kotlin/collections/MutableIterable<P>?|, P>(): R|test/ClassWithTypePRefNext<R, P>|
public open class ClassWithTypePRefNext<R : R|ft<kotlin/collections/MutableIterable<P>, kotlin/collections/MutableIterable<P>?>!|, P> : R|kotlin/Any| {
public constructor<R : R|ft<kotlin/collections/MutableIterable<P>, kotlin/collections/MutableIterable<P>?>!|, P>(): R|test/ClassWithTypePRefNext<R, P>|
}

View File

@@ -1,4 +1,4 @@
public final class ClassWithTypePRefSelf<P : R|kotlin/Enum<P>?|> : R|kotlin/Any| {
public constructor<P : R|kotlin/Enum<P>?|>(): R|test/ClassWithTypePRefSelf<P>|
public final class ClassWithTypePRefSelf<P : R|ft<kotlin/Enum<P>, kotlin/Enum<P>?>!|> : R|kotlin/Any| {
public constructor<P : R|ft<kotlin/Enum<P>, kotlin/Enum<P>?>!|>(): R|test/ClassWithTypePRefSelf<P>|
}

View File

@@ -1,4 +1,4 @@
public final class ClassWithTypePRefSelfAndClass<P : R|test/ClassWithTypePRefSelfAndClass<P>?|> : R|kotlin/Any| {
public constructor<P : R|test/ClassWithTypePRefSelfAndClass<P>?|>(): R|test/ClassWithTypePRefSelfAndClass<P>|
public final class ClassWithTypePRefSelfAndClass<P : R|ft<test/ClassWithTypePRefSelfAndClass<P>, test/ClassWithTypePRefSelfAndClass<P>?>!|> : R|kotlin/Any| {
public constructor<P : R|ft<test/ClassWithTypePRefSelfAndClass<P>, test/ClassWithTypePRefSelfAndClass<P>?>!|>(): R|test/ClassWithTypePRefSelfAndClass<P>|
}

View File

@@ -1,5 +1,5 @@
public open class MethodTypePOneUpperBound : R|kotlin/Any| {
public open operator fun <T : R|kotlin/Cloneable?|> bar(): R|kotlin/Unit|
public open operator fun <T : R|ft<kotlin/Cloneable, kotlin/Cloneable?>!|> bar(): R|kotlin/Unit|
public constructor(): R|test/MethodTypePOneUpperBound|

View File

@@ -1,5 +1,5 @@
public open class MethodTypePTwoUpperBounds : R|kotlin/Any| {
public open operator fun <T : R|kotlin/Cloneable?|, R|java/lang/Runnable?|> foo(): R|kotlin/Unit|
public open operator fun <T : R|ft<kotlin/Cloneable, kotlin/Cloneable?>!|, R|ft<java/lang/Runnable, java/lang/Runnable?>!|> foo(): R|kotlin/Unit|
public constructor(): R|test/MethodTypePTwoUpperBounds|

View File

@@ -1,5 +1,5 @@
public final class MethodWithTypePP : R|kotlin/Any| {
public final operator fun <P, Q : R|P?|> f(): R|kotlin/Unit|
public final operator fun <P, Q : R|ft<P, P?>!|> f(): R|kotlin/Unit|
public constructor(): R|test/MethodWithTypePP|

View File

@@ -1,5 +1,5 @@
public open class MethodWithTypePRefClassP<P> : R|kotlin/Any| {
public final operator fun <Q : R|P?|> f(): R|kotlin/Unit|
public final operator fun <Q : R|ft<P, P?>!|> f(): R|kotlin/Unit|
public constructor<P>(): R|test/MethodWithTypePRefClassP<P>|

View File

@@ -1,2 +1,2 @@
public abstract interface RawUpperBound<T : R|test/RawUpperBound<*>?|> : R|kotlin/Any| {
public abstract interface RawUpperBound<T : R|ft<test/RawUpperBound<*>, test/RawUpperBound<*>?>!|> : R|kotlin/Any| {
}

View File

@@ -1,2 +1,2 @@
public abstract interface RecursiveRawUpperBound<T : R|test/RecursiveRawUpperBound<*>?|> : R|kotlin/Any| {
public abstract interface RecursiveRawUpperBound<T : R|ft<test/RecursiveRawUpperBound<*>, test/RecursiveRawUpperBound<*>?>!|> : R|kotlin/Any| {
}

View File

@@ -1,2 +1,2 @@
public abstract interface RecursiveWildcardUpperBound<T : R|test/RecursiveWildcardUpperBound<*>?|> : R|kotlin/Any| {
public abstract interface RecursiveWildcardUpperBound<T : R|ft<test/RecursiveWildcardUpperBound<*>, test/RecursiveWildcardUpperBound<*>?>!|> : R|kotlin/Any| {
}

View File

@@ -1,4 +1,4 @@
public open class ConstructorGenericUpperBound : R|kotlin/Any| {
public constructor<P : R|java/util/RandomAccess?|>(p: R|ft<P, P?>!|): R|test/ConstructorGenericUpperBound|
public constructor<P : R|ft<java/util/RandomAccess, java/util/RandomAccess?>!|>(p: R|ft<P, P?>!|): R|test/ConstructorGenericUpperBound|
}

View File

@@ -1,5 +1,5 @@
public open class AllBoundsInWhen : R|kotlin/Any| {
public open operator fun <T : R|java/io/Serializable?|> foo(): R|kotlin/Unit|
public open operator fun <T : R|ft<java/io/Serializable, java/io/Serializable?>!|> foo(): R|kotlin/Unit|
public constructor(): R|test/AllBoundsInWhen|

View File

@@ -1,5 +1,5 @@
public open class MethodWithTypeParameters : R|kotlin/Any| {
public open operator fun <A, B : R|java/lang/Runnable?|, R|kotlin/collections/MutableList<kotlin/Cloneable>?|> foo(a: R|ft<A, A?>!|, b: R|ft<kotlin/collections/MutableList<out B>, kotlin/collections/List<out B>?>!|, list: R|ft<kotlin/collections/MutableList<in kotlin/String>, kotlin/collections/List<in kotlin/String>?>!|): R|kotlin/Unit|
public open operator fun <A, B : R|ft<java/lang/Runnable, java/lang/Runnable?>!|, R|ft<kotlin/collections/MutableList<kotlin/Cloneable>, kotlin/collections/MutableList<kotlin/Cloneable>?>!|> foo(a: R|ft<A, A?>!|, b: R|ft<kotlin/collections/MutableList<out B>, kotlin/collections/List<out B>?>!|, list: R|ft<kotlin/collections/MutableList<in kotlin/String>, kotlin/collections/List<in kotlin/String>?>!|): R|kotlin/Unit|
public constructor(): R|test/MethodWithTypeParameters|

View File

@@ -1,5 +1,5 @@
public open class WrongTypeParameterBoundStructure1 : R|kotlin/Any| {
public open operator fun <A, B : R|java/lang/Runnable?|, R|kotlin/collections/MutableList<kotlin/Cloneable>?|> foo(a: R|ft<A, A?>!|, b: R|ft<kotlin/collections/MutableList<out B>, kotlin/collections/List<out B>?>!|): R|kotlin/Unit|
public open operator fun <A, B : R|ft<java/lang/Runnable, java/lang/Runnable?>!|, R|ft<kotlin/collections/MutableList<kotlin/Cloneable>, kotlin/collections/MutableList<kotlin/Cloneable>?>!|> foo(a: R|ft<A, A?>!|, b: R|ft<kotlin/collections/MutableList<out B>, kotlin/collections/List<out B>?>!|): R|kotlin/Unit|
public constructor(): R|test/WrongTypeParameterBoundStructure1|

View File

@@ -1,5 +1,5 @@
public open class Max : R|kotlin/Any| {
public open operator fun <T : R|kotlin/Comparable<in T>?|> max(coll: R|ft<kotlin/collections/MutableCollection<out T>, kotlin/collections/Collection<out T>?>!|): R|ft<T, T?>!|
public open operator fun <T : R|ft<kotlin/Any, kotlin/Any?>!|, R|ft<kotlin/Comparable<in T>, kotlin/Comparable<in T>?>!|> max(coll: R|ft<kotlin/collections/MutableCollection<out T>, kotlin/collections/Collection<out T>?>!|): R|ft<T, T?>!|
public constructor(): R|test/Max|

View File

@@ -1,4 +1,4 @@
public abstract interface GenericInterfaceParameterWithSelfBound<T : R|test/GenericInterfaceParameterWithSelfBound<T>?|> : R|kotlin/Any| {
public abstract interface GenericInterfaceParameterWithSelfBound<T : R|ft<test/GenericInterfaceParameterWithSelfBound<T>, test/GenericInterfaceParameterWithSelfBound<T>?>!|> : R|kotlin/Any| {
public abstract operator fun method(t: R|ft<T, T?>!|): R|ft<T, T?>!|
}

View File

@@ -1,4 +1,4 @@
public abstract interface GenericInterfaceParametersWithBounds<A : R|kotlin/Comparable<A>?|, R|kotlin/Cloneable?|, B : R|kotlin/collections/MutableList<A>?|> : R|kotlin/Any| {
public abstract interface GenericInterfaceParametersWithBounds<A : R|ft<kotlin/Comparable<A>, kotlin/Comparable<A>?>!|, R|ft<kotlin/Cloneable, kotlin/Cloneable?>!|, B : R|ft<kotlin/collections/MutableList<A>, kotlin/collections/MutableList<A>?>!|> : R|kotlin/Any| {
public abstract operator fun method(a: R|ft<kotlin/Array<ft<A, A?>!>, kotlin/Array<out ft<A, A?>!>?>!|, b: R|ft<B, B?>!|): R|kotlin/Unit|
}

View File

@@ -1,4 +1,4 @@
public abstract interface GenericMethodParameters : R|kotlin/Any| {
public abstract operator fun <A : R|kotlin/CharSequence?|, B : R|kotlin/collections/MutableList<A>?|> method(a: R|ft<kotlin/Array<ft<A, A?>!>, kotlin/Array<out ft<A, A?>!>?>!|, b: R|ft<B, B?>!|): R|kotlin/Unit|
public abstract operator fun <A : R|ft<kotlin/CharSequence, kotlin/CharSequence?>!|, B : R|ft<kotlin/collections/MutableList<A>, kotlin/collections/MutableList<A>?>!|> method(a: R|ft<kotlin/Array<ft<A, A?>!>, kotlin/Array<out ft<A, A?>!>?>!|, b: R|ft<B, B?>!|): R|kotlin/Unit|
}

View File

@@ -1,9 +1,9 @@
public open class TypeParameterOfMethod : R|kotlin/Any| {
public open static operator fun <T> max(comparator: R|ft<java/util/Comparator<ft<T, T?>!>, java/util/Comparator<ft<T, T?>!>?>!|, value1: R|ft<T, T?>!|, value2: R|ft<T, T?>!|): R|ft<T, T?>!|
public open static operator fun <T : R|kotlin/CharSequence?|> max2(comparator: R|ft<java/util/Comparator<ft<T, T?>!>, java/util/Comparator<ft<T, T?>!>?>!|, value1: R|ft<T, T?>!|, value2: R|ft<T, T?>!|): R|ft<T, T?>!|
public open static operator fun <T : R|ft<kotlin/CharSequence, kotlin/CharSequence?>!|> max2(comparator: R|ft<java/util/Comparator<ft<T, T?>!>, java/util/Comparator<ft<T, T?>!>?>!|, value1: R|ft<T, T?>!|, value2: R|ft<T, T?>!|): R|ft<T, T?>!|
public open static operator fun <A : R|kotlin/CharSequence?|, B : R|kotlin/collections/MutableList<A>?|> method(a: R|ft<java/util/Comparator<ft<A, A?>!>, java/util/Comparator<ft<A, A?>!>?>!|, b: R|ft<B, B?>!|): R|kotlin/Unit|
public open static operator fun <A : R|ft<kotlin/CharSequence, kotlin/CharSequence?>!|, B : R|ft<kotlin/collections/MutableList<A>, kotlin/collections/MutableList<A>?>!|> method(a: R|ft<java/util/Comparator<ft<A, A?>!>, java/util/Comparator<ft<A, A?>!>?>!|, b: R|ft<B, B?>!|): R|kotlin/Unit|
public constructor(): R|test/TypeParameterOfMethod|