Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/constraints/kt7433.kt
T

10 lines
266 B
Kotlin
Vendored

// FIR_IDENTICAL
// !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 }
}
}