Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/tryNumberLowerBoundsBeforeUpperBounds.fir.kt
T

6 lines
205 B
Kotlin
Vendored

public fun <T: Any> iterate(initialValue: T, nextFunction: (T) -> T?): Iterator<T> =
throw Exception("$initialValue $nextFunction")
fun foo() {
iterate(3) { n -> if (n > 0) n - 1 else null }
}