JS: support toDelegateFor in JS backend (see KT-15163)

This commit is contained in:
Alexey Andreev
2016-12-08 14:20:10 +03:00
committed by Stanislav Erokhin
parent 937a933150
commit a01fac9d10
20 changed files with 171 additions and 223 deletions
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -10,7 +9,7 @@ inline fun <T> runLogged(entry: String, action: () -> T): T {
return action()
}
operator fun String.toDelegateFor(host: Any?, p: Any): String =
operator fun String.toDelegateFor(host: Any?, p: Any): String =
runLogged("tdf($this);") { this }
operator fun String.getValue(receiver: Any?, p: Any): String =
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
object Host {
class StringDelegate(val s: String) {
@@ -1,5 +1,4 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JS
import kotlin.test.*
import kotlin.reflect.KProperty