aimozg
01/30/2017, 9:58 AMinline operator fun MutableTuple.set(index: Int, value: dynamic) { asArray()[index] = value } - there's explicit dynamic, so no error here.
But usually the error is reported in signature, not implementation:
class OutvariantProperty<out T>(
val ro:T
) {
var rw:T // Error: Kotlin: Type parameter T is declared as 'out' but occurs in 'invariant' position in type T
get() = ro
set(value:T) {}
}
var <T> OutvariantProperty<out T>.rw:T //Not only no errors, but also 'redundant projection' warning
get() = ro
set(value:T) {}