82255d5ee8
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
34 lines
672 B
Kotlin
Vendored
34 lines
672 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// FULL_JDK
|
|
// WITH_STDLIB
|
|
// SEPARATE_SIGNATURE_DUMP_FOR_K2
|
|
// ^ ISSUE: KT-65667
|
|
|
|
// FILE: 1.kt
|
|
import java.util.SortedMap
|
|
|
|
abstract class A : SortedMap<Boolean, Boolean>, Map<Boolean, Boolean>
|
|
|
|
abstract class B : SortedMap<Boolean, Boolean>, Map<Boolean, Boolean> {
|
|
override fun put(key: Boolean, value: Boolean): Boolean? {
|
|
return false
|
|
}
|
|
|
|
override fun remove(key: Boolean?): Boolean? {
|
|
return false
|
|
}
|
|
}
|
|
|
|
fun test(a: A, b: B) {
|
|
a.size
|
|
a[true] = true
|
|
a.put(null, null)
|
|
a.get(true)
|
|
a.get(null)
|
|
a.remove(null)
|
|
a.remove(true)
|
|
|
|
b.put(false, false)
|
|
b[true] = true
|
|
b.remove(null)
|
|
} |