Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/overloading.kt
T
2021-12-02 20:24:19 +03:00

21 lines
331 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
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
}