Files
kotlin-fork/js/js.translator/testData/box/inline/rootConstructor.kt
T
Alexey Andreev 3b3fd0fa0d JS: fix DCE limits in test data to fit new kotlin.js size
The size has increased due to new implementation of KClass
2017-10-06 18:16:51 +03:00

24 lines
402 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1112
/*
* Copy of JVM-backend test
* Found at: compiler/testData/codegen/boxInline/simple/rootConstructor.1.kt
*/
package foo
inline fun <R> doWork(crossinline job: ()-> R) : R {
return notInline({job()})
}
fun <R> notInline(job: ()-> R) : R {
return job()
}
val s = doWork({11})
fun box(): String {
if (s != 11) return "test1: ${s}"
return "OK"
}