Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/kt52207.kt
T
2022-12-06 23:16:11 +00:00

20 lines
241 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class A
class Example {
context(A)
inline fun fn(x: Int) {}
}
fun test() {
with(A()) {
Example().fn(1)
}
}
fun box(): String {
test()
return "OK"
}