KT-313 Bug in substitutions in a function returning its type parameter T

This commit is contained in:
Andrey Breslav
2011-11-12 20:29:38 +04:00
parent 8d8145c3d2
commit c74a0a62cc
12 changed files with 36 additions and 20 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ fun foo(c: Consumer<Int>, p: Producer<Int>, u: Usual<Int>) {
}
//Arrays copy example
class Array<T>(val length : Int) {
fun get(index : Int) : T { return null }
class Array<T>(val length : Int, val t : T) {
fun get(index : Int) : T { return t }
fun set(index : Int, value : T) { /* ... */ }
}