[FIR] Implement INCONSISTENT_TYPE_PARAMETER_VALUES, INCONSISTENT_TYPE_PARAMETER_BOUNDS
This commit is contained in:
committed by
teamcityserver
parent
ec20f52707
commit
92d7a61b4f
@@ -1,43 +0,0 @@
|
||||
// FILE: a.kt
|
||||
interface A<in T> {}
|
||||
interface B<T> : A<Int> {}
|
||||
interface C<T> : B<T>, A<T> {}
|
||||
interface C1<T> : B<T>, A<Any> {}
|
||||
interface D : C<Boolean>, B<Double>{}
|
||||
|
||||
interface A1<out T> {}
|
||||
interface B1 : A1<Int> {}
|
||||
interface B2 : A1<Any>, B1 {}
|
||||
|
||||
interface BA1<T> {}
|
||||
interface BB1 : BA1<Int> {}
|
||||
interface BB2 : BA1<Any>, BB1 {}
|
||||
|
||||
|
||||
// FILE: b.kt
|
||||
package x
|
||||
interface AA1<out T> {}
|
||||
interface AB1 : AA1<Int> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : AA1<Number>, AB1, AB3 {}
|
||||
|
||||
// FILE: c.kt
|
||||
package x2
|
||||
interface AA1<out T> {}
|
||||
interface AB1 : AA1<Any> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : AA1<Number>, AB1, AB3 {}
|
||||
|
||||
// FILE: d.kt
|
||||
package x3
|
||||
interface AA1<in T> {}
|
||||
interface AB1 : AA1<Any> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : AA1<Number>, AB1, AB3 {}
|
||||
|
||||
// FILE: e.kt
|
||||
package sx2
|
||||
interface AA1<in T> {}
|
||||
interface AB1 : AA1<Int> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : AA1<Number>, AB1, AB3 {}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: a.kt
|
||||
interface A<in T> {}
|
||||
interface B<T> : A<Int> {}
|
||||
@@ -16,28 +17,36 @@ interface BB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>BA1<Any>, BB1<!> {}
|
||||
|
||||
// FILE: b.kt
|
||||
package x
|
||||
interface AA1<out T> {}
|
||||
interface AB1 : AA1<Int> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
interface AA1<out T> {}
|
||||
interface AB1 : AA1<Int> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
|
||||
// FILE: c.kt
|
||||
package x2
|
||||
interface AA1<out T> {}
|
||||
interface AB1 : AA1<Any> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
interface AA1<out T> {}
|
||||
interface AB1 : AA1<Any> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
|
||||
// FILE: d.kt
|
||||
package x3
|
||||
interface AA1<in T> {}
|
||||
interface AB1 : AA1<Any> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
interface AA1<in T> {}
|
||||
interface AB1 : AA1<Any> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
|
||||
// FILE: e.kt
|
||||
package sx2
|
||||
interface AA1<in T> {}
|
||||
interface AB1 : AA1<Int> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
interface AA1<in T> {}
|
||||
interface AB1 : AA1<Int> {}
|
||||
interface AB3 : AA1<Comparable<Int>> {}
|
||||
interface AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
|
||||
|
||||
// FILE: f.kt
|
||||
interface I0<T1, T2>
|
||||
abstract class C2<T3, T4> : I0<T3, T4>
|
||||
typealias TA<T5, T6> = C2<T6, T5>
|
||||
interface I2
|
||||
interface I3
|
||||
class C3 : TA<I2, I3>(), I0<I3, I2>
|
||||
@@ -60,12 +60,45 @@ public interface C1</*0*/ T> : B<T>, A<kotlin.Any> {
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class C2</*0*/ T3, /*1*/ T4> : I0<T3, T4> {
|
||||
public constructor C2</*0*/ T3, /*1*/ T4>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class C3 : TA<I2, I3> /* = C2<I3, I2> */, I0<I3, I2> {
|
||||
public constructor C3()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface D : C<kotlin.Boolean>, B<kotlin.Double> {
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface I0</*0*/ T1, /*1*/ T2> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface I2 {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface I3 {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
public typealias TA</*0*/ T5, /*1*/ T6> = C2<T6, T5>
|
||||
|
||||
package sx2 {
|
||||
|
||||
public interface AA1</*0*/ in T> {
|
||||
@@ -173,3 +206,4 @@ package x3 {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
interface A
|
||||
interface B: A
|
||||
interface D
|
||||
|
||||
interface BaseSuper<out T>
|
||||
interface BaseImpl: BaseSuper<D>
|
||||
interface DerivedSuper<out S>: BaseSuper<S>, BaseImpl
|
||||
|
||||
fun test(t: BaseSuper<B>) = t is DerivedSuper<A>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
interface A
|
||||
interface B: A
|
||||
interface D
|
||||
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
interface A
|
||||
interface B : A
|
||||
|
||||
interface ListA : List<A>
|
||||
interface ListB : List<B>
|
||||
|
||||
interface Z<T> where T : ListA, T : ListB
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
interface A
|
||||
interface B : A
|
||||
|
||||
|
||||
Vendored
-33
@@ -1,33 +0,0 @@
|
||||
interface IA {
|
||||
fun method(): String
|
||||
val propVal: String
|
||||
var propVar: String
|
||||
}
|
||||
|
||||
interface IB1 : IA
|
||||
interface IB2 : IA
|
||||
|
||||
interface IGA<T> {
|
||||
fun method(): T
|
||||
val propVal: T
|
||||
var propVar: T
|
||||
}
|
||||
|
||||
interface IGB1Str : IGA<String>
|
||||
interface IGB2Str : IGA<String>
|
||||
interface IGB3Int : IGA<Int>
|
||||
|
||||
interface IGB4T<T> : IGA<T>
|
||||
interface IGB5T<T> : IGA<T>
|
||||
|
||||
interface IC : IB1, IB2
|
||||
|
||||
interface IGC1 : IGB1Str, IGB2Str
|
||||
|
||||
interface IGC2 : IGB1Str, IGB3Int
|
||||
|
||||
interface IGC3<T> : IGB4T<T>, IGB5T<T>
|
||||
|
||||
interface IGC4<T> : IGB4T<T>, IGB5T<String>
|
||||
|
||||
interface IGC5 : IGB4T<String>, IGB5T<String>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
interface IA {
|
||||
fun method(): String
|
||||
val propVal: String
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
interface X<T>
|
||||
interface A: X<String>
|
||||
interface B : A, X<Int>
|
||||
interface B : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>A, X<Int><!>
|
||||
|
||||
fun foo(x: B) {
|
||||
// Checks that when checking subtypes we search closes corresponding constructor (e.g. with BFS)
|
||||
|
||||
Reference in New Issue
Block a user