Files
anzhela.sukhanova 82255d5ee8 [Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability

Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
2024-03-04 16:21:02 +00:00

36 lines
608 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 C<T> : SortedMap<T, T>
abstract class D<T>(
override val size: Int
) : SortedMap<T, T> {
override fun remove(key: T): T? {
return null
}
}
fun test(c: C<Boolean>, d: D<Boolean>){
c.size
c[false] = false
c[null] = null
c.remove(null)
c.remove(true)
c.get(null)
c.get(true)
d.size
d[false] = false
d[null] = null
d.remove(null)
d.remove(true)
d.get(null)
d.get(true)
}