New J2K: Fix existing test data
This commit is contained in:
committed by
Ilya Kirillov
parent
5236858c20
commit
f752796408
@@ -0,0 +1,13 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
internal class A {
|
||||
fun createCollection(): MutableCollection<String?> {
|
||||
return ArrayList()
|
||||
}
|
||||
|
||||
fun foo(): Collection<String?> {
|
||||
val collection = createCollection()
|
||||
collection.add("a")
|
||||
return collection
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
internal class A {
|
||||
private val collection: MutableCollection<String?>?
|
||||
|
||||
init {
|
||||
collection = createCollection()
|
||||
}
|
||||
|
||||
fun createCollection(): MutableCollection<String?> {
|
||||
return ArrayList()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
collection!!.add("1")
|
||||
}
|
||||
|
||||
fun getCollection(): Collection<String?>? {
|
||||
return collection
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class TestMutableCollection {
|
||||
val list: MutableList<String?> = ArrayList()
|
||||
|
||||
fun test() {
|
||||
val it = list.iterator()
|
||||
while (it.hasNext()) {
|
||||
val s = it.next()
|
||||
if (s == "") it.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user