mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
16 lines
341 B
Kotlin
Vendored
16 lines
341 B
Kotlin
Vendored
|
|
class C() {
|
|
fun Any.toMyPrefixedString(prefix: String = "", suffix: String="") : String = prefix + " " + suffix
|
|
|
|
fun testReceiver() : String {
|
|
val res : String = "mama".toMyPrefixedString("111", "222")
|
|
return res
|
|
}
|
|
|
|
}
|
|
|
|
fun box() : String {
|
|
if(C().testReceiver() != "111 222") return "fail"
|
|
return "OK"
|
|
}
|