allow delegated properties to have getters and setters without bodies

This commit is contained in:
Dmitry Jemerov
2015-03-04 13:50:58 +01:00
committed by Andrey Breslav
parent 8ba15937f9
commit e9266481c5
7 changed files with 60 additions and 3 deletions
@@ -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) {}
}