Replace is Array<T> with .isArrayOf<T>()

This commit is contained in:
Alexey Tsvetkov
2015-10-09 21:22:19 +03:00
parent 01cd277d63
commit 62c25c0370
19 changed files with 114 additions and 44 deletions
@@ -2,7 +2,7 @@ import java.util.Arrays
fun box(): String {
val array = Arrays.asList(2, 3, 9).toTypedArray()
if (array !is Array<Int>) return array.javaClass.toString()
if (!array.isArrayOf<Int>()) return array.javaClass.toString()
val str = Arrays.toString(array)
if (str != "[2, 3, 9]") return str