Files
kotlin-fork/compiler/testData/diagnostics/tests/varargs/varargsAndOut1.kt
T
2015-04-29 16:33:24 +02:00

13 lines
248 B
Kotlin
Vendored

// !CHECK_TYPE
fun test(vararg a: String) {
a checkType { _<Array<out String>>() }
foo(a) checkType { _<Array<out String>>() }
}
fun <T> test1(vararg t: T) {
t checkType { _<Array<out T>>() }
}
fun <T> foo(a: Array<T>): Array<T> = a