Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/contextualFunctionConversion.kt
T
Vladimir Sukharev 3aa6c9e74d [K/N] Run irText tests for K1/Native
^KT-58240
2023-09-05 11:42:45 +00:00

13 lines
302 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// KT-61141: K1/Native does not support context receivers
// IGNORE_BACKEND_K1: NATIVE
fun withContext(f: context(String) () -> String) = f("OK")
fun callWithContext(f: (String) -> String) = withContext(f)
fun box(): String {
return callWithContext { s -> s }
}