Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/tryNumberLowerBoundsBeforeUpperBounds.kt
T
Mikhael Bogdanov d11311ec20 Test compilation fix
2013-12-02 18:30:42 +04:00

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 }
}