Replaced List and Collection with mutable analogs.

This commit is contained in:
Evgeny Gerashchenko
2012-11-07 18:04:00 +04:00
parent 3318804030
commit 266313a02e
11 changed files with 11 additions and 11 deletions
@@ -1,2 +1,2 @@
fun ff(c: Collection<String>) = c <!CAST_NEVER_SUCCEEDS!>as<!> List<Int>
fun ff(c: MutableCollection<String>) = c <!CAST_NEVER_SUCCEEDS!>as<!> MutableList<Int>
@@ -1,2 +1,2 @@
fun ff(c: Collection<String>) = c as List<String>
fun ff(c: MutableCollection<String>) = c as MutableList<String>
@@ -1,3 +1,3 @@
fun ff(l: Any) = l as List<*>
fun ff(l: Any) = l as MutableList<*>
@@ -1,2 +1,2 @@
fun ff(a: Any) = <!UNCHECKED_CAST!>a as List<String><!>
fun ff(a: Any) = <!UNCHECKED_CAST!>a as MutableList<String><!>
@@ -3,5 +3,5 @@ open class A
class B : A()
fun ff(l: Collection<B>) = l is List<out A>
fun ff(l: MutableCollection<B>) = l is MutableList<out A>
@@ -1,3 +1,3 @@
fun ff(l: Collection<String>) = l is List<String>
fun ff(l: MutableCollection<String>) = l is MutableList<String>
@@ -1,3 +1,3 @@
fun ff<T>(l: Collection<T>) = l is List<T>
fun ff<T>(l: MutableCollection<T>) = l is MutableList<T>
@@ -1,2 +1,2 @@
fun ff(l: Any) = l is <!CANNOT_CHECK_FOR_ERASED!>List<String><!>
fun ff(l: Any) = l is <!CANNOT_CHECK_FOR_ERASED!>MutableList<String><!>
@@ -1,2 +1,2 @@
fun f(a : List<out Any>) = a is <!CANNOT_CHECK_FOR_ERASED!>List<out Int><!>
fun f(a : MutableList<out Any>) = a is <!CANNOT_CHECK_FOR_ERASED!>MutableList<out Int><!>
@@ -1,2 +1,2 @@
fun ff(l: Any) = l is List<*>
fun ff(l: Any) = l is MutableList<*>
@@ -1,5 +1,5 @@
fun ff(l: Any) = when(l) {
is <!CANNOT_CHECK_FOR_ERASED!>List<String><!> -> 1
is <!CANNOT_CHECK_FOR_ERASED!>MutableList<String><!> -> 1
else <!SYNTAX!>2<!>
}