[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
+37
@@ -0,0 +1,37 @@
|
||||
abstract class A : HashSet<Int>, SequencedSet<Int> {
|
||||
constructor() /* primary */ {
|
||||
super/*HashSet*/<Int>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun spliterator(): Spliterator<Int> {
|
||||
return CHECK_NOT_NULL<Nothing>(arg0 = null)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class B : HashSet<Int>, SequencedSet<Int> {
|
||||
constructor() /* primary */ {
|
||||
super/*HashSet*/<Int>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun reversed(): SequencedSet<Int> {
|
||||
return CHECK_NOT_NULL<Nothing>(arg0 = null)
|
||||
}
|
||||
|
||||
override fun spliterator(): Spliterator<Int> {
|
||||
return CHECK_NOT_NULL<Nothing>(arg0 = null)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
a.<get-size>() /*~> Unit */
|
||||
a.addFirst(p0 = null)
|
||||
a.reversed() /*~> Unit */
|
||||
b.reversed() /*~> Unit */
|
||||
b.addFirst(p0 = 1)
|
||||
}
|
||||
Reference in New Issue
Block a user