Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/contextualFunctionConversion.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

11 lines
215 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
fun withContext(f: context(String) () -> String) = f("OK")
fun callWithContext(f: (String) -> String) = withContext(f)
fun box(): String {
return callWithContext { s -> s }
}