fc5217f7fc
Do not treat members with already changed signature as a reason to create a hidden copy See tests for clarification: - There are `charAt` method in B that has different name in Kotlin - `get`, i.e. relevant descriptor has initialSignatureDescriptor != null - When collecting methods from supertypes, `charAt` from A is also get transformed to `get` - So it has effectively the same signature as B.get (already declared) - If by an accident B.get had been declared with Kotlin signature we would have add A.charAt (after transformation) with special flag: HiddenToOvercomeSignatureClash (hides it from resolution) - But here B.charAt was artificially changed to `get`, so no signature clash actually happened #KT-13730 Fixed
20 lines
416 B
Kotlin
Vendored
20 lines
416 B
Kotlin
Vendored
// FILE: Dict.java
|
|
|
|
public abstract class Dict<K, V> {
|
|
abstract public V get(Object key);
|
|
}
|
|
|
|
// FILE: MHashtable.java
|
|
|
|
abstract public class MHashtable<X, Y> extends Dict<X, Y> implements java.util.Map<X, Y> {
|
|
public V get(Object key) { return null; }
|
|
}
|
|
|
|
// FILE: main.kt
|
|
|
|
abstract class C1 : MHashtable<String, Int>()
|
|
|
|
abstract class C2 : MHashtable<String, Int>() {
|
|
override fun get(key: String) = 1
|
|
}
|