Files
kotlin-fork/compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt
T
Mikhail Glukhikh a4c7619c89 [FIR2IR] Introduce & use FirBuiltInsPackageFragment
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.
2020-03-24 10:37:53 +03:00

29 lines
724 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// 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"
}