Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/passingLambdaToContextualParam.kt
T
Sergej Jaskiewicz 973adb6a38 [test] Remove TARGET_BACKEND: JVM_IR for non JVM-specific irText tests
If they fail on other backends, use the IGNORE_BACKEND directive instead
2023-05-16 18:28:23 +00:00

10 lines
163 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
class C {
val result = "OK"
}
fun contextual(f: context(C) () -> String) = f(C())
fun box(): String = contextual { result }