Files
kotlin/compiler/testData/codegen/box/boxingOptimization/foldRange.kt
2019-11-19 11:00:09 +03:00

14 lines
224 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
import kotlin.test.assertEquals
fun box(): String {
val result = (1..5).fold(0) { x, y -> x + y }
assertEquals(15, result)
return "OK"
}