Made vararg parameters have Array<out T> type
instead of simply Array<T> #KT-1638 Fixed #KT-2163 Fixed #KT-3213 Fixed #KT-4172 Fixed #KT-5534 Fixed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun test(vararg a: String) {
|
||||
a checkType { it : _<Array<out String>> }
|
||||
|
||||
foo(a) checkType { it : _<Array<out String>> }
|
||||
}
|
||||
|
||||
fun <T> test1(vararg t: T) {
|
||||
t checkType { it : _<Array<out T>> }
|
||||
}
|
||||
|
||||
fun <T> foo(a: Array<T>): Array<T> = a
|
||||
Reference in New Issue
Block a user