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

27 lines
669 B
Kotlin
Vendored

// IGNORE_BACKEND: NATIVE
open class Base<Target : DatabaseEntity>() : HashSet<Target>() {
override fun remove(element: Target): Boolean {
return true
}
}
class Derived : Base<Issue>() {
// common "synthetic bridge override fun remove(element: DatabaseEntity): Boolean" should call
// `INVOKEVIRTUAL remove(Issue)`
// instead of `INVOKEVIRTUAL remove(OBJECT)`
override fun remove(element: Issue): Boolean {
return super.remove(element)
}
}
open class DatabaseEntity
class Issue: DatabaseEntity()
fun box(): String {
val sprintIssues = Derived()
if (!sprintIssues.remove(Issue())) return "Fail"
return "OK"
}