Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/resolve/resolveTwoReferencesAgainstGenerics.kt
T

10 lines
246 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
// WITH_STDLIB
fun <T> List<Option<T>>.flatten(): List<T> = flatMap { it.fold(::emptyList, ::listOf) }
class Option<out T> {
fun <R> fold(ifEmpty: () -> R, ifSome: (T) -> R): R = TODO()
}