Files
kotlin-fork/compiler/testData/diagnostics/tests/varargs/varargsAndPair.kt
T
Evgeny Gerashchenko 897854b3dc KT-6671 Report unused constructor parameters
#KT-6671 fixed
2015-01-27 22:38:27 +03:00

8 lines
214 B
Kotlin

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