JS: refactor generation of callable references to functions
This commit is contained in:
-2
@@ -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)}"
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
fun box(): String {
|
||||
if ((Boolean::not)(true) != false) return "Fail 1"
|
||||
if ((Boolean::not)(false) != true) return "Fail 2"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
enum class E {
|
||||
ENTRY
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
class A
|
||||
|
||||
fun box() = if ((A::equals)(A(), A())) "Fail" else "OK"
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
fun box(): String {
|
||||
fun OK() {}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
private fun <T> upcast(value: T): T = value
|
||||
|
||||
fun box(): String {
|
||||
|
||||
-3
@@ -1,6 +1,3 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// See KT-12337 Reference to property with invisible setter should not be a KMutableProperty
|
||||
|
||||
import kotlin.reflect.KProperty1
|
||||
|
||||
Reference in New Issue
Block a user