[IR] Support const optimizations for JS backend
This commit is contained in:
Vendored
+4
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user