Introduce propertyDelegated method in delegates
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
class Delegate {
|
||||
var count = 0
|
||||
fun get(t: Any?, p: PropertyMetadata) {}
|
||||
fun propertyDelegated(vararg p: PropertyMetadata) { count++ }
|
||||
}
|
||||
|
||||
val delegate = Delegate()
|
||||
|
||||
val prop1 by delegate
|
||||
val prop2 by delegate
|
||||
|
||||
fun box(): String {
|
||||
return if(delegate.count == 2) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user