More wise lambda search during inlining

This commit is contained in:
Michael Bogdanov
2016-02-03 13:49:20 +03:00
parent 16f412f993
commit bc2077bfaf
16 changed files with 269 additions and 4 deletions
@@ -0,0 +1,18 @@
package test
object ContentTypeByExtension {
inline fun processRecords(crossinline operation: (String) -> String) =
listOf("O", "K").map {
val ext = B(it)
operation(ext.toLowerCase())
}.joinToString("")
}
inline fun A.toLowerCase(): String = (this as B).value
open class A
open class B(val value: String) : A()