82255d5ee8
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
37 lines
755 B
Kotlin
Vendored
37 lines
755 B
Kotlin
Vendored
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)
|
|
}
|