mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
16 lines
293 B
Kotlin
16 lines
293 B
Kotlin
interface MyIterable<T> : Iterable<T>
|
|
|
|
class E : RuntimeException()
|
|
fun foo(): MyIterable<String> = throw E()
|
|
|
|
fun box(): String {
|
|
try {
|
|
foo().iterator().next()
|
|
return "Fail: E should have been thrown"
|
|
} catch (e: E) {}
|
|
|
|
Test.checkCallFromJava()
|
|
|
|
return "OK"
|
|
}
|