[FIR] Don't report DEPRECATION on self-access in delegated property
#KT-60682
This commit is contained in:
committed by
Space Team
parent
411210b520
commit
21f8ba1706
@@ -13,6 +13,15 @@ class Delegate() {
|
||||
operator fun setValue(instance: Any, property: KProperty<*>, value: Int) {}
|
||||
}
|
||||
|
||||
class Delegate2() {
|
||||
operator fun getValue(instance: Any, property: KProperty<*>) : Int = 1
|
||||
operator fun setValue(instance: Any, property: KProperty<*>, value: Int) {}
|
||||
}
|
||||
|
||||
class DelegateProvider() {
|
||||
operator fun provideDelegate(instance: Any, property: KProperty<*>) = Delegate2()
|
||||
}
|
||||
|
||||
class PropertyHolder {
|
||||
@Deprecated("text")
|
||||
val x = 1
|
||||
@@ -23,6 +32,14 @@ class PropertyHolder {
|
||||
val valDelegate by <!DEPRECATION!>Delegate()<!>
|
||||
var varDelegate by <!DEPRECATION, DEPRECATION!>Delegate()<!>
|
||||
|
||||
// no deprecation caused by access to itself
|
||||
@Deprecated("text")
|
||||
var deprecatedDelegated by Delegate2()
|
||||
|
||||
// no deprecation caused by access to itself
|
||||
@Deprecated("text")
|
||||
val deprecatedDelegated2 by DelegateProvider()
|
||||
|
||||
public val test1: String = ""
|
||||
@Deprecated("val-getter") get
|
||||
|
||||
|
||||
Reference in New Issue
Block a user