added annotations for Collections and Arrays

This commit is contained in:
Svetlana Isakova
2012-09-24 14:18:04 +04:00
parent 32d707ca9b
commit 85f3dbf4fc
10 changed files with 409 additions and 13 deletions
@@ -6,7 +6,7 @@ import java.util.Collections.*
fun foo(list: List<String>) : String {
val w : String = max(list, comparator<String?> {o1, o2 -> 1
})!!
})
return w
}
@@ -8,6 +8,6 @@ fun test() {
//here possibly can be a cycle on constraints
val <!UNUSED_VARIABLE!>x<!> = g { Collections.<!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyList<!>() }
val <!UNUSED_VARIABLE!>y<!> = g<Int> { Collections.emptyList()!! }
val <!UNUSED_VARIABLE!>z<!> : List<Int> = g { Collections.emptyList()!! }
val <!UNUSED_VARIABLE!>y<!> = g<Int> { Collections.emptyList() }
val <!UNUSED_VARIABLE!>z<!> : List<Int> = g { Collections.emptyList() }
}
@@ -3,7 +3,7 @@
import java.util.*
fun <T : Comparable<T>> List<T>.sort() {
fun <T : Comparable<T>> MutableList<T>.sort() {
Collections.sort(this) // Error here
}