Make Array type parameter T non-reified

This commit is contained in:
Alexey Tsvetkov
2015-10-08 18:17:53 +03:00
parent 62c25c0370
commit 5449cea6b7
25 changed files with 62 additions and 29 deletions
@@ -27,6 +27,7 @@ fun foo() {
// ---------------------
// copy from kotlin util (but with `infix` modifier on `map`)
@Suppress("UNCHECKED_CAST")
fun <T> array(vararg t : T) : Array<T> = t as Array<T>
infix fun <T, R> Array<T>.map(<!UNUSED_PARAMETER!>transform<!> : (T) -> R) : List<R> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>