Replace get() and set() to getValue() and setValue() (property delegates)

This commit is contained in:
Yan Zhulanow
2015-10-05 20:18:58 +03:00
parent 2fee9d362c
commit 1f2b4e20fe
295 changed files with 718 additions and 511 deletions
+3 -3
View File
@@ -19,8 +19,8 @@ fun foo(c: Consumer<Int>, p: Producer<Int>, u: Usual<Int>) {
//Arrays copy example
class Array<T>(val length : Int, val t : T) {
fun get(index : Int) : T { return t }
fun set(index : Int, value : T) { /* ... */ }
fun get(<!UNUSED_PARAMETER!>index<!> : Int) : T { return t }
fun set(<!UNUSED_PARAMETER!>index<!> : Int, <!UNUSED_PARAMETER!>value<!> : T) { /* ... */ }
}
fun copy1(<!UNUSED_PARAMETER!>from<!> : Array<Any>, <!UNUSED_PARAMETER!>to<!> : Array<Any>) {}
@@ -37,4 +37,4 @@ fun f(ints: Array<Int>, any: Array<Any>, numbers: Array<Number>) {
copy2(ints, <!TYPE_MISMATCH!>numbers<!>)
copy3<Int>(ints, numbers)
copy4(ints, numbers) //ok
}
}