[FIR] Fix references to generic synthetic properties

When synthetic properties are built from a substitution override,
set originalForSubstitutionOverride, too.

^KT-56251 Fixed
This commit is contained in:
Kirill Rakhman
2023-03-02 10:54:04 +01:00
committed by Space Team
parent 37760d1f2a
commit b80970b09f
14 changed files with 124 additions and 15 deletions
@@ -0,0 +1,27 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_K1: JVM_IR
// K1_STATUS: Broken because of KT-57103
// FILE: J.java
public class J<T> {
private final T value;
public J(T value) {
this.value = value;
}
public T getValue() {
return value;
}
}
// FILE: test.kt
fun box(): String {
val j = J("OK")
if (j.value != "OK") return "FAIL"
if (run(j::value) != "OK") return "FAIL"
if (j.let(J<String>::value) != "OK") return "FAIL"
return "OK"
}