blob: 365c780683a8ec485a3bc8587e3a4c1fa510d283 [file] [log] [blame]
fun interface FunWithReceiver {
fun String.foo(): String
}
val prop = FunWithReceiver { this }
fun bar(s: String, f: FunWithReceiver): String {
return with(f) {
s.foo()
}
}
fun box(): String {
val r1 = with(prop) {
"OK".foo()
}
if (r1 != "OK") return "failed 1"
return bar("O") { this + "K" }
}