IR: get overridden directly from IrProperty when resolving fake override
The previous way of getting them either via getter or setter failed on
Java properties which only have a backing field. Now that IrProperty has
overriddenSymbols (after 53c1de172f), it makes sense to use it directly
instead. Use it only in SyntheticAccessorLowering though to avoid
breaking Kotlin/Native (see KT-47019).
#KT-46900 Fixed
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: Base.java
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class Base {
|
||||
@NotNull
|
||||
protected String result = "OK";
|
||||
}
|
||||
|
||||
// FILE: Derived.kt
|
||||
|
||||
open class Mid : Base()
|
||||
|
||||
class Derived : Mid() {
|
||||
fun foo(): String =
|
||||
(Derived::result)(this)
|
||||
}
|
||||
|
||||
fun box(): String = Derived().foo()
|
||||
Reference in New Issue
Block a user