2257fa36ec
Fix import in testData Fix testData: replace removed method.
26 lines
495 B
Kotlin
Vendored
26 lines
495 B
Kotlin
Vendored
package pack
|
|
|
|
import java.util.ArrayList
|
|
import java.util.regex.Pattern
|
|
|
|
class C{
|
|
public fun foo(){
|
|
val items : Collection<Item> = java.util.Collections.singleton(Item())!!
|
|
val result = ArrayList<Item>()
|
|
val pattern: Pattern? = Pattern.compile("...")
|
|
items.filterTo(result) {
|
|
pattern!!.matcher(it.name())!!.matches()
|
|
}
|
|
}
|
|
|
|
private fun Item.name() : String = ""
|
|
}
|
|
|
|
class Item{
|
|
}
|
|
|
|
fun box() : String {
|
|
C().foo()
|
|
return "OK"
|
|
}
|