Rename toDelegateFor to provideDelegate.

This commit is contained in:
Stanislav Erokhin
2016-12-12 14:56:16 +03:00
parent db5250a614
commit 9dc9fb578f
71 changed files with 278 additions and 276 deletions
@@ -0,0 +1,15 @@
// WITH_RUNTIME
object Host {
class StringDelegate(val s: String) {
operator fun getValue(receiver: String, p: Any) = receiver + s
}
operator fun String.provideDelegate(host: Any?, p: Any) = StringDelegate(this)
val String.plusK by "K"
val ok = "O".plusK
}
fun box(): String = Host.ok