[FIR] Forbid suspend operator get/setValue and provideDelegate
#KT-58989 Fixed
This commit is contained in:
committed by
Space Team
parent
aea8bac7d2
commit
ca022cf4dc
Vendored
+1
-1
@@ -4,5 +4,5 @@ fun bar(d: Delegate): String {
|
||||
}
|
||||
|
||||
class Delegate {
|
||||
suspend operator fun getValue(thisRef: Any?, property: Any?): String = ""
|
||||
suspend <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun getValue(thisRef: Any?, property: Any?): String = ""
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@ class A {
|
||||
suspend <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun equals(a: A) = a === this
|
||||
suspend operator fun set(a: A, b: A) {}
|
||||
|
||||
suspend operator fun provideDelegate(a: A, p: KProperty<*>) = a
|
||||
suspend operator fun getValue(a: A, p: KProperty<*>) = a
|
||||
suspend operator fun setValue(a: A, p: KProperty<*>, b: A) {}
|
||||
suspend <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun provideDelegate(a: A, p: KProperty<*>) = a
|
||||
suspend <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun getValue(a: A, p: KProperty<*>) = a
|
||||
suspend <!INAPPLICABLE_OPERATOR_MODIFIER!>operator<!> fun setValue(a: A, p: KProperty<*>, b: A) {}
|
||||
}
|
||||
|
||||
class B
|
||||
|
||||
Reference in New Issue
Block a user