K2 resolve: prefer derived class property to base class field
#KT-50082 Fixed
This commit is contained in:
committed by
teamcity
parent
642bbd38ba
commit
59bafedd8a
+28
@@ -0,0 +1,28 @@
|
||||
// FILE: Test.java
|
||||
|
||||
public class Test extends KotlinBase {
|
||||
public final String abcd = "ABCD";
|
||||
|
||||
public final String zyxw = "ZYXW";
|
||||
}
|
||||
|
||||
// FILE: KotlinBase.kt
|
||||
|
||||
open class KotlinBase {
|
||||
val abcd = "abcd"
|
||||
}
|
||||
|
||||
// FILE: KotlinProxy.kt
|
||||
|
||||
interface KotlinProxy {
|
||||
val zyxw get() = "zyxw"
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
class Derived : Test(), KotlinProxy {
|
||||
fun test() {
|
||||
abcd // field!
|
||||
zyxw // field!
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user