Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextualFunctionConversion.kt
T
2022-04-06 16:05:39 +00:00

12 lines
241 B
Kotlin
Vendored

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