Added diagnostic test for Array<T> instances usage
when T is not reified
This commit is contained in:
committed by
Andrey Breslav
parent
e768b4e285
commit
eec4b7094c
@@ -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()
|
||||
Reference in New Issue
Block a user