Fix variance problems.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
trait R<in T: Comparable<T>> {
|
||||
trait R<T: Comparable<T>> {
|
||||
var value: T
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ class Holder(var value: Int) {
|
||||
fun set(that: Any?, desc: PropertyMetadata, newValue: Int) { value = newValue }
|
||||
}
|
||||
|
||||
trait R<in T: Comparable<T>> {
|
||||
trait R<T: Comparable<T>> {
|
||||
var value: T
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
open class A<out T> () {
|
||||
open class A<T> () {
|
||||
fun plus(e: T) = B<T> (e)
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class Zin<in T> {}
|
||||
|
||||
class Params(val methodIndex: Int, val paramClass: Class<*>, val expectedReturnType: String, val expecedParamType: String)
|
||||
|
||||
class Test<T, out X, in Y>() {
|
||||
class Test<T, X, in Y>() {
|
||||
|
||||
fun test1(p: T): T? = null
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ trait A
|
||||
trait B: A
|
||||
trait D
|
||||
|
||||
trait BaseSuper<T>
|
||||
trait BaseSuper<out T>
|
||||
trait BaseImpl: BaseSuper<D>
|
||||
trait DerivedSuper<out S>: <!INCONSISTENT_TYPE_PARAMETER_VALUES!>BaseSuper<S>, BaseImpl<!>
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ internal trait BaseImpl : BaseSuper<D> {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal trait BaseSuper</*0*/ T> {
|
||||
internal trait BaseSuper</*0*/ out T> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user