KT-4198 On covariant projection, do not throw whole var's away

#KT-4198 Fixed
This commit is contained in:
Andrey Breslav
2013-11-16 19:38:45 +04:00
parent 3fe55c997f
commit 38b38e7b6d
11 changed files with 123 additions and 4 deletions
@@ -0,0 +1,12 @@
trait Tr<T> {
var v: T
}
class C {
fun plusAssign(<!UNUSED_PARAMETER!>c<!>: C) {}
}
fun test(t: Tr<out C>) {
// No error because no real assignment happens
t.v += null!!
}