getValue()/setValue() should be marked with 'operator'

This commit is contained in:
Yan Zhulanow
2015-10-12 01:59:40 +03:00
parent bc3d1ddda0
commit dc8e796e49
121 changed files with 242 additions and 231 deletions
@@ -21,12 +21,12 @@ fun getMyConcreteProperty() = MyProperty<Any?, String>()
class MyProperty<R, T> {
public fun getValue(thisRef: R, desc: PropertyMetadata): T {
operator fun getValue(thisRef: R, desc: PropertyMetadata): T {
println("get $thisRef ${desc.name}")
return null as T
}
public fun setValue(thisRef: R, desc: PropertyMetadata, value: T) {
operator fun setValue(thisRef: R, desc: PropertyMetadata, value: T) {
println("set $thisRef ${desc.name} $value")
}
}