allow delegated properties to have getters and setters without bodies
This commit is contained in:
committed by
Andrey Breslav
parent
8ba15937f9
commit
e9266481c5
@@ -0,0 +1,12 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
var a: Int by Delegate()
|
||||
private set
|
||||
|
||||
class Delegate {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun set(t: Any?, p: PropertyMetadata, i: Int) {}
|
||||
}
|
||||
Reference in New Issue
Block a user