Fix signature clash problems caused by special built-ins
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
This commit is contained in:
@@ -11216,6 +11216,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("irrelevantCharAtAbstract.kt")
|
||||
public void testIrrelevantCharAtAbstract() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantCharAtAbstract.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("irrelevantImplCharSequence.kt")
|
||||
public void testIrrelevantImplCharSequence() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequence.kt");
|
||||
@@ -11240,6 +11246,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("irrelevantMapGetAbstract.kt")
|
||||
public void testIrrelevantMapGetAbstract() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("mapGetOverride.kt")
|
||||
public void testMapGetOverride() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.kt");
|
||||
|
||||
Reference in New Issue
Block a user