Files
kotlin-fork/compiler/testData/codegen/box/inference/kt26345.kt
T
Mikhail Zarechenskiy 032fdd63d9 Ignore codegen test for Android
There is no such method as java.util.List.stream
2020-06-29 15:26:20 +03:00

21 lines
456 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FULL_JDK
// WITH_RUNTIME
// JVM_TARGET: 1.8
// IGNORE_BACKEND: ANDROID
import java.util.stream.Collectors
import java.util.function.Function
fun box(): String {
val m = listOf("OK", "OK")
.stream()
.collect(
Collectors.groupingBy(
Function.identity(),
Collectors.counting()
)
)
if (m["OK"] != 2L) return "fail: ${m["OK"]}"
return "OK"
}