[K/JS] Optimize logical operators generating
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user