Files
kotlin-fork/compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt
T
2020-03-02 09:49:28 +03:00

11 lines
228 B
Kotlin
Vendored

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"
}