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

50 lines
870 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FULL_JDK
// WITH_STDLIB
// SEPARATE_SIGNATURE_DUMP_FOR_K2
// ^ ISSUE: KT-65667
// FILE: Java1.java
abstract public class Java1 extends KotlinClass {}
// FILE: 1.kt
import java.util.SortedMap
abstract class A : Java1()
abstract class B : Java1() {
override val size: Int
get() = 5
override fun get(key: Boolean?): Boolean? {
return true
}
override fun isEmpty(): Boolean {
return true
}
}
abstract class KotlinClass : SortedMap<Boolean, Boolean>
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)
a.isNotEmpty()
b.size
b.put(false, false)
b.put(null, null)
b[null] = null
b[true] = true
b.get(null)
b.get(true)
b.remove(null)
b.remove(true)
b.isEmpty()
}