mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
12 lines
246 B
Kotlin
Vendored
12 lines
246 B
Kotlin
Vendored
fun typeName(a: Any?) : String {
|
|
return when(a) {
|
|
is ArrayList<*> -> "array list"
|
|
else -> "no idea"
|
|
}
|
|
}
|
|
|
|
fun box() : String {
|
|
if(typeName(ArrayList<Int>()) != "array list") return "array list failed"
|
|
return "OK"
|
|
}
|