[JS IR] Introduce the GENERATE_INLINE_ANONYMOUS_FUNCTIONS feature flag

This commit is contained in:
Sergej Jaskiewicz
2022-04-20 14:00:18 +03:00
committed by Space
parent c10af22b27
commit e03747ea7d
18 changed files with 245 additions and 17 deletions
@@ -0,0 +1,16 @@
fun <T> bar(x: T, y: (T) -> Boolean): Boolean = y(x) && jsTypeOf(x.asDynamic()) != "number"
fun typeOf(x: dynamic) = js("typeof x")
fun box(): String {
val f = { x: Char ->
val a: Char = x
val b: Any = x
typeOf(a) == "number" && typeOf(b) == "object"
}
if (!f('Q')) return "fail1"
if (!bar('W', f)) return "fail2"
return "OK"
}