KT-1406 wrong generation of receiver for ext.fun called inside closure
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package pack
|
||||
|
||||
import java.util.Collection
|
||||
import java.util.ArrayList
|
||||
import java.util.regex.Pattern
|
||||
|
||||
class C{
|
||||
public fun foo(){
|
||||
val items : Collection<Item> = java.util.Collections.singleton(Item()).sure()
|
||||
val result = ArrayList<Item>()
|
||||
val pattern: Pattern? = Pattern.compile("...")
|
||||
items.filterTo(result) {
|
||||
pattern.sure().matcher(it.name()).sure().matches()
|
||||
}
|
||||
}
|
||||
|
||||
private fun Item.name() : String = ""
|
||||
}
|
||||
|
||||
class Item{
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
C().foo()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user