K2: build override structure for Java renamed builtins more precisely

#KT-65410 Fixed
This commit is contained in:
Mikhail Glukhikh
2024-02-08 14:11:18 +01:00
committed by Space Team
parent c6f5e5f297
commit a189509353
7 changed files with 28 additions and 54 deletions
@@ -16,25 +16,17 @@ NonCharSequenceBuffer:
NonCharBuffer:
[Enhancement]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /NonCharBuffer [id: 0]
[Library]: /* hidden due to clash */ public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /NonCharBuffer [id: 0]
[Library]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Use site scope of kotlin/CharSequence [id: 1]
CharBufferXAllInherited:
[Library]: /* hidden due to clash */ public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharBufferXAllInherited [id: 0]
[Library]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Use site scope of kotlin/CharSequence [id: 1]
[Enhancement]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharBufferXAllInherited [id: 0]
CharBufferXYAllInherited:
[Library]: /* hidden due to clash */ public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharBufferXYAllInherited [id: 0]
[Library]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Use site scope of kotlin/CharSequence [id: 1]
[IntersectionOverride]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharBufferXYAllInherited [id: 0]
[Enhancement]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /X [id: 1]
[Enhancement]: protected/*protected and package*/ abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /Y [id: 2]
CharBufferXYCharAt:
[Library]: /* hidden due to clash */ public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharBufferXYCharAt [id: 0]
[Library]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Use site scope of kotlin/CharSequence [id: 1]
[RenamedForOverride]: public abstract fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharAt [id: 2]
[IntersectionOverride]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /CharBufferXYCharAt [id: 0]
[Enhancement]: public abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /X [id: 1]
[Enhancement]: protected/*protected and package*/ abstract operator fun get(index: R|kotlin/Int|): R|kotlin/Char| from Java enhancement scope for /Y [id: 2]
@@ -1,34 +0,0 @@
// 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()
@@ -1,6 +1,10 @@
// FIR_IDENTICAL
// WITH_STDLIB
// SCOPE_DUMP: A:removeAt
// ISSUE: KT-65410
// IGNORE_DIAGNOSTIC_API
// IGNORE_REVERSED_RESOLVE
// Reason: SCOPE_DUMP uses different parameter names in AA modes
// FILE: Java1.java
import kotlin.collections.AbstractMutableList;
@@ -1,8 +1,6 @@
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]