Files
kotlin-fork/compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt
T
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

43 lines
1.1 KiB
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// FILE: Test.java
class Test {
interface A {
boolean add(String s);
}
static class D extends C {}
void test() {
A a = new D();
a.add("lol");
}
}
// FILE: test.kt
abstract class C : Test.A, List<String> {
override val size: Int get() = null!!
override fun isEmpty(): Boolean = null!!
override fun contains(o: String): Boolean = null!!
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>): Boolean = null!!
override fun get(index: Int): String = null!!
override fun indexOf(o: String): Int = null!!
override fun lastIndexOf(o: String): Int = null!!
override fun listIterator(): ListIterator<String> = null!!
override fun listIterator(index: Int): ListIterator<String> = null!!
override fun subList(fromIndex: Int, toIndex: Int): List<String> = null!!
}
fun box(): String {
try {
Test().test()
return "Fail"
} catch (e: UnsupportedOperationException) {
return "OK"
}
}