[K/JS] Optimize logical operators generating

This commit is contained in:
Artem Kobzar
2024-02-23 15:16:31 +00:00
committed by Space Team
parent 425381ddf9
commit be47632609
10 changed files with 63 additions and 2 deletions
@@ -0,0 +1,13 @@
val a = true
val b = true
val c = true
fun foo() = true
fun bar() = true
// EXPECT_GENERATED_JS: function=test expect=logicalOperators.js
fun test(): Boolean = (!a || (b && c)) && foo() || bar()
fun box(): String {
return if (test()) "OK" else "FAILED"
}