1b553ebfaf
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
30 lines
494 B
Kotlin
30 lines
494 B
Kotlin
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_RUNTIME
|
|
// FULL_JDK
|
|
|
|
package pack
|
|
|
|
import java.util.regex.Pattern
|
|
|
|
class C{
|
|
public fun foo(){
|
|
val items : Collection<Item> = listOf(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"
|
|
}
|