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

19 lines
311 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// MODULE: lib
// FILE: A.kt
package a
context(String)
fun f(useArg: Boolean, arg: String = "K") = if (useArg) arg else this@String
// MODULE: main(lib)
// FILE: B.kt
fun box(): String {
return with("O") {
a.f(false) + a.f(true)
}
}