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
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: BaseJava.java
|
||||
|
||||
public interface BaseJava {
|
||||
String x = "";
|
||||
String y = "";
|
||||
}
|
||||
|
||||
// FILE: DerivedEnum.kt
|
||||
|
||||
enum class DerivedEnum : BaseJava {
|
||||
x;
|
||||
|
||||
fun foo() {
|
||||
bar(x)
|
||||
baz(<!UNRESOLVED_REFERENCE!>y<!>)
|
||||
baz(BaseJava.y)
|
||||
}
|
||||
}
|
||||
|
||||
fun bar(e: DerivedEnum) {}
|
||||
|
||||
fun baz(s: String) {
|
||||
DerivedEnum.x
|
||||
}
|
||||
Reference in New Issue
Block a user