Files
kotlin-fork/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt
T
2019-11-19 11:00:09 +03:00

12 lines
258 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
class Box<T>(val value: T)
fun <T> run(vararg z: T): Box<T> {
return Box<T>(z[0])
}
fun box(): String {
val b = run<Long>(-1, -1, -1)
val expected: Long? = -1L
return if (b.value == expected) "OK" else "fail"
}