K2: reproduce KT-65410 in diagnostic/BB tests

This commit is contained in:
Mikhail Glukhikh
2024-01-31 08:37:47 +01:00
committed by Space Team
parent b6c805bbb6
commit ba374a3978
18 changed files with 214 additions and 0 deletions
@@ -0,0 +1,34 @@
// WITH_STDLIB
// SCOPE_DUMP: A:removeAt
// ISSUE: KT-65410
// FILE: Java1.java
import kotlin.collections.AbstractMutableList;
public class Java1 extends AbstractMutableList<Integer> {
@Override
public int getSize() {
return 0;
}
@Override
public void add(int i, Integer integer) {}
@Override
public Integer removeAt(int i) {
return null;
}
@Override
public Integer get(int index) {
return null;
}
@Override
public Integer set(int i, Integer integer) {
return null;
}
}
// FILE: 1.kt
<!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED("Class 'A'; removeAt")!>class A<!> : Java1()
@@ -0,0 +1,14 @@
A:
[Enhancement]: public open fun removeAt(i: R|kotlin/Int|): R|kotlin/Int!| from Use site scope of /A [id: 0]
[Enhancement]: public open fun removeAt(i: R|kotlin/Int|): R|kotlin/Int!| from Java enhancement scope for /Java1 [id: 0]
[SubstitutionOverride(DeclarationSite)]: /* hidden due to clash */ public abstract fun removeAt(index: R|kotlin/Int|): R|kotlin/Int!| from Use site scope of /A [id: 0]
[SubstitutionOverride(DeclarationSite)]: /* hidden due to clash */ public abstract fun removeAt(index: R|kotlin/Int|): R|kotlin/Int!| from Java enhancement scope for /Java1 [id: 0]
[SubstitutionOverride(DeclarationSite)]: public abstract fun removeAt(index: R|kotlin/Int|): R|kotlin/Int!| from Substitution scope for [Use site scope of kotlin/collections/AbstractMutableList] for type Java1 [id: 1]
[Library]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Use site scope of kotlin/collections/AbstractMutableList [id: 2]
[SubstitutionOverride(DeclarationSite)]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type kotlin/collections/AbstractMutableList<E> [id: 3]
[Library]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Use site scope of kotlin/collections/MutableList [id: 4]
[SubstitutionOverride(DeclarationSite)]: public open operator fun removeAt(p0: R|kotlin/Int|): R|ft<E & Any, E?>| from Substitution scope for [Java enhancement scope for java/util/AbstractList] for type kotlin/collections/AbstractMutableList<E> [id: 5]
[Enhancement]: public open operator fun removeAt(p0: R|kotlin/Int|): R|ft<E & Any, E?>| from Java enhancement scope for java/util/AbstractList [id: 6]
[SubstitutionOverride(DeclarationSite)]: public abstract fun removeAt(index: R|kotlin/Int|): R|ft<E & Any, E?>| from Substitution scope for [Use site scope of kotlin/collections/MutableList] for type java/util/AbstractList<E> [id: 7]
[Library]: public abstract fun removeAt(index: R|kotlin/Int|): R|E| from Use site scope of kotlin/collections/MutableList [id: 4]
@@ -0,0 +1,34 @@
// WITH_STDLIB
// SCOPE_DUMP: A:removeAt
// ISSUE: KT-65410
// FILE: Java1.java
import kotlin.collections.AbstractMutableList;
public class Java1 extends AbstractMutableList<Integer> {
@Override
public int getSize() {
return 0;
}
@Override
public void add(int i, Integer integer) {}
@Override
public Integer removeAt(int i) {
return null;
}
@Override
public Integer get(int index) {
return null;
}
@Override
public Integer set(int i, Integer integer) {
return null;
}
}
// FILE: 1.kt
class A : Java1()