Files
kotlin/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt
2018-06-28 12:26:41 +02:00

30 lines
530 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// 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()
}