JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs
This commit is contained in:
committed by
teamcityserver
parent
bfb1a06f3d
commit
851980e36f
@@ -5,12 +5,14 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
val p = { "OK" }()
|
||||
fun <T> eval(lambda: () -> T) = lambda()
|
||||
|
||||
val p = eval { "OK" }
|
||||
|
||||
val getter: String
|
||||
get() = { "OK" }()
|
||||
get() = eval { "OK" }
|
||||
|
||||
fun f() = { "OK" }()
|
||||
fun f() = eval { "OK" }
|
||||
|
||||
val obj = object : Function0<String> {
|
||||
override fun invoke() = "OK"
|
||||
|
||||
Reference in New Issue
Block a user