JS: refactor generation of callable references to functions

This commit is contained in:
Alexey Andreev
2017-01-16 16:44:42 +03:00
parent 1b0648a926
commit 7a0f75f164
18 changed files with 87 additions and 268 deletions
@@ -1,5 +1,3 @@
// Enable when callable references to builtin members is supported
// IGNORE_BACKEND: JS
fun box(): String {
var state = 0
val name = (state++)::toString.name
@@ -1,5 +1,3 @@
// Enable when callable references to builtin members is supported
// IGNORE_BACKEND: JS
fun <T> get(t: T): () -> String {
return t::toString
}
@@ -1,5 +1,4 @@
//WITH_RUNTIME
// IGNORE_BACKEND: JS
fun box(): String {
val a = intArrayOf(1, 2)
val b = arrayOf("OK")
@@ -1,5 +1,3 @@
// Enable when callable references to builtin members is supported
// IGNORE_BACKEND: JS
fun box(): String {
val f = "KOTLIN"::get
return "${f(1)}${f(0)}"