[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:
committed by
Space Team
parent
30aae741a6
commit
82255d5ee8
Vendored
+36
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user