[FIR Java] Hide function in scope in case it's an accessor by fact
#KT-42116 Fixed
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
// FILE: PropertyDescriptor.java
|
||||
|
||||
public interface PropertyDescriptor extends DescriptorWithAccessor {
|
||||
String getSetter();
|
||||
boolean isDelegated();
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
interface DescriptorWithAccessor {
|
||||
val setter: String
|
||||
val isDelegated: Boolean
|
||||
}
|
||||
|
||||
class WrappedPropertyDescriptor : PropertyDescriptor {
|
||||
override val setter: String get() = "K"
|
||||
override val isDelegated: Boolean get() = false
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val descriptor = WrappedPropertyDescriptor()
|
||||
val res1 = descriptor.setter
|
||||
val res2 = descriptor.<!UNRESOLVED_REFERENCE!>getSetter<!>() // Should be error
|
||||
val res3 = descriptor.isDelegated
|
||||
val res4 = descriptor.<!UNRESOLVED_REFERENCE!>isDelegated<!>() // Should be error
|
||||
}
|
||||
Reference in New Issue
Block a user