added annotations for Collections and Arrays
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user