Added diagnostic test for Array<T> instances usage

when T is not reified
This commit is contained in:
Denis Zharkov
2014-11-10 10:39:17 +04:00
committed by Andrey Breslav
parent e768b4e285
commit eec4b7094c
4 changed files with 176 additions and 0 deletions
@@ -0,0 +1,11 @@
class A<T>(val x: Array<T>) {
val y: Int = x[0].toString().length
fun foo(a: T) {
x[0] = a
}
fun <R> bar(a: Array<R>): Int = a[0].toString().length
}
fun <T> baz(a: Array<T>): String = a[0].toString()