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
@@ -5,7 +5,7 @@ class A1 {
}
class MyProperty1 {}
fun MyProperty1.getValue(thisRef: Any?, desc: PropertyMetadata): String {
operator fun MyProperty1.getValue(thisRef: Any?, desc: PropertyMetadata): String {
throw Exception("$thisRef $desc")
}
@@ -16,7 +16,7 @@ class A2 {
}
class MyProperty2<T> {}
fun <T> MyProperty2<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
operator fun <T> MyProperty2<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
throw Exception("$thisRef $desc")
}
@@ -27,7 +27,7 @@ class A3 {
class MyProperty3<T> {}
fun <T> MyProperty3<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
operator fun <T> MyProperty3<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
throw Exception("$thisRef $desc")
}
}