Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/constraints/kt7433.kt
T
2015-04-16 21:02:42 +03:00

9 lines
249 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
public inline fun <S, T: S> Iterable<T>.reduce1(operation: (S, T) -> S): S = throw Exception()
fun test(ints: List<Int>) {
val f: () -> Unit = {
ints.reduce1 { a, b -> a + b }
}
}