KT-62695 [AA] Better resolve ambiguous receiver types in KDocReferenceResolver
When encountering multiple available same named types, resolve all of them together with corresponding extensions. This aligns well with the current resolve behavior of classes with the same name (see `SameNameClassesFromStarImports.kt`) Also, add extra test for resolving the ambiguous type without the extension function. The behavior is the same - resolve to the both classes.
This commit is contained in:
committed by
Space Team
parent
e5c6a5bac3
commit
d45662c2c3
+18
@@ -1486,6 +1486,18 @@ public class Fe10IdeNormalAnalysisSourceModuleReferenceResolveTestGenerated exte
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/extensions/qualifiers.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("receiverTypesWithSameName_nestedScopes.kt")
|
||||
public void testReceiverTypesWithSameName_nestedScopes() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/extensions/receiverTypesWithSameName_nestedScopes.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("receiverTypesWithSameName_starImports.kt")
|
||||
public void testReceiverTypesWithSameName_starImports() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/extensions/receiverTypesWithSameName_starImports.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("topLevelFunction.kt")
|
||||
public void testTopLevelFunction() throws Exception {
|
||||
@@ -1554,6 +1566,12 @@ public class Fe10IdeNormalAnalysisSourceModuleReferenceResolveTestGenerated exte
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/referenceResolve/kDoc/imports"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("SameNameClassesFromStarImports.kt")
|
||||
public void testSameNameClassesFromStarImports() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/imports/SameNameClassesFromStarImports.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("TypeAliasedImport.kt")
|
||||
public void testTypeAliasedImport() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user