[IR] Support const optimizations for JS backend

This commit is contained in:
Ivan Kylchik
2023-05-29 00:19:47 +02:00
committed by Space Team
parent abbafc0b2a
commit d3d28783c5
22 changed files with 292 additions and 32 deletions
@@ -1,15 +1,18 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// WITH_STDLIB
fun <T> T.id() = this
fun someSideEffect(value: Any?) = {}
class A {
val a = ""
fun b() = ""
init {
println("A init")
someSideEffect("A init")
}
fun test() {