Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/varargs/varargsAndPair.kt
T
2012-09-07 18:24:22 +04:00

8 lines
186 B
Kotlin

fun foo<T>(vararg <!UNUSED_PARAMETER!>ts<!>: T): T? = null
class Pair<A>(a: A)
fun test() {
val v = foo(Pair(1))
<!TYPE_MISMATCH!>v<!>: Int // check that it is not error type
}