Files
kotlin/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt
2016-02-27 15:40:05 +03:00

29 lines
504 B
Kotlin
Vendored

// FILE: 1.kt
package test
class Company(val name: String) {
fun sayName() = Person("test").doSayName { name }
}
class Person(val name: String) {
inline fun doSayName(crossinline call: () -> String): String {
return companyName { parsonName { call() } }
}
inline fun parsonName(call: () -> String) = call()
fun companyName(call: () -> String) = call()
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
fun box(): String {
return Company("OK").sayName()
}