Files
kotlin-fork/compiler/testData/codegen/box/arrays/kt779.kt
T
Alexander Udalov 128c938965 Make Array.size() a function instead of a property
Also add a deprecated extension property to help migration. This is done to
unify getting size of arrays and collections
2014-11-17 15:02:38 +03:00

4 lines
112 B
Kotlin

val <T> Array<T>.length : Int get() = this.size()
fun box() = if(Array(10, {1}).length == 10) "OK" else "fail"