FIR: Preserve K1 behavior for synthetic properties on raw type

^KT-54502 Fixed
This commit is contained in:
Denis.Zharkov
2022-10-20 13:05:25 +02:00
committed by Space Team
parent 7b15b28ee2
commit c0e0900344
7 changed files with 88 additions and 2 deletions
@@ -0,0 +1,24 @@
// SKIP_TXT
// FIR_IDENTICAL
// FILE: Generic.java
import java.util.List;
public class Generic<T extends Generic> {
// Returns Raw type
public static Generic create() { return null; }
public List<String> getFoo() { return null; }
public T getChild() { return null; }
public List<Generic> getChildren() { return null; }
}
// FILE: main.kt
fun main() {
val generic = Generic.create() // has a type of Generic<(raw) Any..Any?>
generic.getFoo() // has return type List<(raw) Any..Any?>
generic.getFoo()[0].<!UNRESOLVED_REFERENCE!>length<!> // Unresolved "length"
generic.foo[0].length // OK
generic.child.children[0].foo[0].length // OK
}