Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/fullJdk/regressions/kt1406.kt
T
Alexander Udalov 72aa3d1465 Use mock JDK in compiler tests where full JDK is not needed
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be
  compiled against the full JDK
- introduce FULL_JDK in-text directive for the reflection test as only 4 tests
  out of 654 needed the full JDK
2015-04-02 21:57:48 +03:00

28 lines
517 B
Kotlin
Vendored

package pack
import java.util.ArrayList
import java.util.regex.Pattern
import kotlin.util.*
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"
}