Files
kotlin/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedIterable/substitutedIterable.kt
2014-11-07 16:10:12 +03:00

16 lines
289 B
Kotlin

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