Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt
T
2015-09-25 19:20:20 +03:00

13 lines
237 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNREACHABLE_CODE
interface Tr<T> {
var v: T
}
class C {
operator fun plusAssign(<!UNUSED_PARAMETER!>c<!>: C) {}
}
fun test(t: Tr<out C>) {
// No error because no real assignment happens
t.v += null!!
}