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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user