Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/overloading.kt
T
2021-12-09 13:26:37 +03:00

22 lines
385 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
context(Int, String)
fun foo(): String = "O"
context(Int)
fun foo(): String = "K"
fun box(): String {
val o = with ("") {
with(42) {
foo()
}
}
val k = with(42) {
foo()
}
return o + k
}