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

21 lines
302 B
Kotlin
Vendored

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