Files
kotlin-fork/compiler/testData/codegen/boxInline/callableReference/kt15449.kt
T
Mark Punzalan 348ba3e08c [FIR] Enable BlackBoxInlineCodegen tests for FIR.
16 out of 638 tests (2.5%) are currently failing.
2020-09-29 10:21:21 +03:00

41 lines
595 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// FILE: 1.kt
package test
inline fun linearLayout2(init: X.() -> Unit) {
return X().init()
}
var result = "fail"
class X {
fun calc() {
result = "OK"
}
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
class A {
fun test() {
linearLayout2 {
{
apply2 {
this@linearLayout2::calc
}()
}()
}
}
public fun <T, Z> T.apply2(block: T.() -> Z): Z {
return block()
}
}
fun box(): String {
A().test()
return result
}