mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
14 lines
365 B
Kotlin
14 lines
365 B
Kotlin
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
package kotlin1
|
|
import java.util.*
|
|
|
|
public inline fun <reified T> Array(n: Int, block: (Int) -> T): Array<T> = null!!
|
|
|
|
|
|
fun main(args : Array<String>) {
|
|
val al : ArrayList<Int> = ArrayList<Int>()
|
|
|
|
// A type mismatch on this line means that jdk-annotations were not loaded
|
|
al.toArray(Array<Int>(3, {1})) : Array<Int>
|
|
}
|