[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>
This commit is contained in:
anzhela.sukhanova
2024-01-19 18:22:17 +02:00
committed by Space Team
parent 30aae741a6
commit 82255d5ee8
853 changed files with 269404 additions and 0 deletions
@@ -0,0 +1,38 @@
abstract class A : SortedMap<Boolean, Boolean>, Map<Boolean, Boolean> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
abstract class B : SortedMap<Boolean, Boolean>, Map<Boolean, Boolean> {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
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.<get-size>() /*~> Unit */
a.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true)
a.put(key = null, value = null) /*~> Unit */
a.get(key = true) /*~> Unit */
a.get(key = null) /*~> Unit */
a.remove(key = null) /*~> Unit */
a.remove(key = true) /*~> Unit */
b.put(key = false, value = false) /*~> Unit */
b.set<@FlexibleNullability Boolean?, @FlexibleNullability Boolean?>(key = true, value = true)
b.remove(key = null) /*~> Unit */
}