Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/parameterizedContextualLambda.kt
T
Anastasia.Shadrina d857142514 KT-51243 Fix parameterized contextual lambda
^KT-51243 Fixed
2022-05-17 15:27:26 +00:00

14 lines
272 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// FIR status: context receivers aren't yet supported
class A {
val result = "OK"
}
fun <T> test(receiver: T, action: context(T) () -> String) = action(receiver)
fun box(): String = with(A()) {
result
}