Files
kotlin/compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00

32 lines
671 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// FILE: Test.java
public class Test {
public static void checkCallFromJava() {
try {
String x = TestKt.foo().iterator().next();
throw new AssertionError("E should have been thrown");
} catch (E e) { }
}
}
// FILE: test.kt
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"
}