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

25 lines
659 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
open class SetStringImpl {
fun add(s: String): Boolean = false
fun remove(o: String): Boolean = false
fun clear(): Unit {}
}
class S : Set<String>, SetStringImpl() {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override fun contains(o: String): Boolean = false
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>) = false
}
fun box(): String {
val s = S() as java.util.Set<String>
s.add("")
s.remove("")
s.clear()
return "OK"
}