mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Move tests to the right place
This commit is contained in:
committed by
Dmitry Petrov
parent
9274241c0e
commit
e1f44d6237
@@ -1,16 +0,0 @@
|
||||
// JVM_TARGET: 1.8
|
||||
|
||||
fun <T> Array<T>.getLength(): Int {
|
||||
return this.size
|
||||
}
|
||||
|
||||
fun Any.getLength() =
|
||||
if (this is Array<*>) size else -1
|
||||
|
||||
fun testCheckcast1(): Int {
|
||||
val array1: Array<String> = arrayOf("1", "2", "3")
|
||||
val array2: Any = arrayOf("1", "2", "3")
|
||||
return array1.getLength() + array2.getLength()
|
||||
}
|
||||
|
||||
// 1 CHECKCAST
|
||||
Reference in New Issue
Block a user