Files
kotlin/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt
2018-06-28 12:26:41 +02:00

31 lines
518 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// FILE: 1.kt
// LANGUAGE_VERSION: 1.2
// SKIP_INLINE_CHECK_IN: inlineFun$default
// CHECK_CONTAINS_NO_CALLS: test
package test
//problem in test framework
inline fun inlineFunStub(){}
interface A {
val value: String
fun test() = inlineFun()
private inline fun inlineFun(lambda: () -> String = { value }): String {
return lambda()
}
}
// FILE: 2.kt
import test.*
class B : A {
override val value: String = "OK"
}
fun box(): String {
return B().test()
}