23420ecf7a
While annotations restrict the set of allowed types to a few final built-ins, in arbitrary constants we can have array elements that are some subtype of the array's element type. #KT-48671 Fixed
5 lines
121 B
Kotlin
Vendored
5 lines
121 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
val x: Any = arrayOf<Any>(arrayOf("OK"))
|
|
|
|
fun box(): String = ((x as Array<Any>)[0] as Array<String>)[0]
|