Files
kotlin-fork/compiler/testData/codegen/box/boxingOptimization/foldRange.kt
T
2016-11-09 21:41:12 +03:00

15 lines
265 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
// WITH_RUNTIME
import kotlin.test.assertEquals
fun box(): String {
val result = (1..5).fold(0) { x, y -> x + y }
assertEquals(15, result)
return "OK"
}