K1: introduce synthetic assignment checker with deprecation for KT-54305

#KT-54305 Fixed
Related to KT-54309
This commit is contained in:
Mikhail Glukhikh
2022-10-05 20:13:49 +02:00
committed by Space Team
parent 7bd512fbb3
commit 80fa765333
11 changed files with 114 additions and 4 deletions
@@ -0,0 +1,15 @@
// FIR_IDENTICAL
// FILE: JavaClass.java
import java.util.List;
public interface JavaClass<E> {
List<? extends E> getFoo();
void setFoo(List<? extends E> l);
}
// FILE: main.kt
fun foo(x: JavaClass<in CharSequence>, l: MutableList<out CharSequence>) {
x.setFoo(l) // OK
x.foo = l // Should be OK, too
}