[AA] Fix KDoc reference resolution of non-imported companion object members
- Similar to the fix for KTIJ-25995, the name interpretation collector needs to consider the companion object's member scope as well. ^KTIJ-25995
This commit is contained in:
committed by
Space Team
parent
0add17d9da
commit
ef484c7518
+1
-1
@@ -264,7 +264,7 @@ internal object KDocReferenceResolver {
|
||||
|
||||
else -> {
|
||||
getClassOrObjectSymbolByClassId(classId)
|
||||
?.getCombinedMemberScope()
|
||||
?.getCompositeCombinedMemberAndCompanionObjectScope()
|
||||
?.getCallableSymbols(callableId.callableName)
|
||||
?.let(::addAll)
|
||||
}
|
||||
|
||||
+6
@@ -1930,6 +1930,12 @@ public class FirIdeDependentAnalysisSourceModuleReferenceResolveTestGenerated ex
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/withErrors/invalidPropertyAccessOnFunctionFromCompanionObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invalidPropertyAccessOnFunctionFromNonImportedCompanionObject.kt")
|
||||
public void testInvalidPropertyAccessOnFunctionFromNonImportedCompanionObject() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/withErrors/invalidPropertyAccessOnFunctionFromNonImportedCompanionObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invalidPropertyAccessOnFunctionFromSuperClass.kt")
|
||||
public void testInvalidPropertyAccessOnFunctionFromSuperClass() throws Exception {
|
||||
|
||||
+6
@@ -1930,6 +1930,12 @@ public class FirIdeNormalAnalysisSourceModuleReferenceResolveTestGenerated exten
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/withErrors/invalidPropertyAccessOnFunctionFromCompanionObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invalidPropertyAccessOnFunctionFromNonImportedCompanionObject.kt")
|
||||
public void testInvalidPropertyAccessOnFunctionFromNonImportedCompanionObject() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/referenceResolve/kDoc/withErrors/invalidPropertyAccessOnFunctionFromNonImportedCompanionObject.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("invalidPropertyAccessOnFunctionFromSuperClass.kt")
|
||||
public void testInvalidPropertyAccessOnFunctionFromSuperClass() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user