[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,36 @@
class A : LinkedList<Int>, SequencedCollection<Int> {
constructor() /* primary */ {
super/*LinkedList*/<@FlexibleNullability Int?>()
/* <init>() */
}
}
class B : LinkedList<Int>, SequencedCollection<Int> {
constructor() /* primary */ {
super/*LinkedList*/<@FlexibleNullability Int?>()
/* <init>() */
}
override fun addFirst(e: Int?) {
}
override fun reversed(): LinkedList<Int> {
return CHECK_NOT_NULL<Nothing>(arg0 = null)
}
}
fun test(a: A, b: B) {
a.<get-size>() /*~> Unit */
a.remove(element = 1) /*~> Unit */
a.addFirst(p0 = 3)
a.addLast(p0 = null)
a.removeFirst() /*~> Unit */
a.removeLast() /*~> Unit */
a.reversed<Int>() /*~> Unit */
b.reversed<Int>() /*~> Unit */
b.addFirst(e = 1)
}