Fix tests: "infix modifier required" and "operator modifier required" errors

This commit is contained in:
Yan Zhulanow
2015-11-26 15:56:56 +03:00
parent a3ff3ffc45
commit 9d1af5a17e
635 changed files with 1283 additions and 1617 deletions
@@ -4,14 +4,14 @@ import java.lang.reflect.InvocationTargetException
import kotlin.reflect.*
object Delegate {
fun getValue(t: Any?, p: KProperty<*>): String {
operator fun getValue(t: Any?, p: KProperty<*>): String {
(p as? KProperty0<String>)?.get()
(p as? KProperty1<O, String>)?.get(O)
(p as? KProperty2<O, O, String>)?.get(O, O)
return "Fail"
}
fun setValue(t: Any?, p: KProperty<*>, v: String) {
operator fun setValue(t: Any?, p: KProperty<*>, v: String) {
(p as? KMutableProperty0<String>)?.set(v)
(p as? KMutableProperty1<O, String>)?.set(O, v)
(p as? KMutableProperty2<O, O, String>)?.set(O, O, v)