KT-65152 [AA] Fix resolve of partial package qualifiers in KDocs
^KT-65152 Fixed
This commit is contained in:
committed by
Space Team
parent
38e0b154c3
commit
f402daba98
+4
-2
@@ -70,12 +70,14 @@ internal object KDocReferenceResolver {
|
|||||||
*/
|
*/
|
||||||
context(KtAnalysisSession)
|
context(KtAnalysisSession)
|
||||||
private fun findParentSymbol(symbol: KtSymbol, goBackSteps: Int, selectedFqName: FqName): KtSymbol? {
|
private fun findParentSymbol(symbol: KtSymbol, goBackSteps: Int, selectedFqName: FqName): KtSymbol? {
|
||||||
if (symbol !is KtDeclarationSymbol) return null
|
if (symbol !is KtDeclarationSymbol && symbol !is KtPackageSymbol) return null
|
||||||
var currentSymbol: KtDeclarationSymbol? = symbol
|
|
||||||
|
var currentSymbol = symbol as? KtDeclarationSymbol
|
||||||
repeat(goBackSteps) {
|
repeat(goBackSteps) {
|
||||||
currentSymbol = currentSymbol?.getContainingSymbol() as? KtClassOrObjectSymbol
|
currentSymbol = currentSymbol?.getContainingSymbol() as? KtClassOrObjectSymbol
|
||||||
}
|
}
|
||||||
currentSymbol?.let { return it }
|
currentSymbol?.let { return it }
|
||||||
|
|
||||||
return getPackageSymbolIfPackageExists(selectedFqName)
|
return getPackageSymbolIfPackageExists(selectedFqName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -2,16 +2,16 @@ Caret 1 resolved to:
|
|||||||
0: package one
|
0: package one
|
||||||
|
|
||||||
Caret 2 resolved to:
|
Caret 2 resolved to:
|
||||||
Nothing (Unresolved reference)
|
0: package one
|
||||||
|
|
||||||
Caret 3 resolved to:
|
Caret 3 resolved to:
|
||||||
0: package one.two
|
0: package one.two
|
||||||
|
|
||||||
Caret 4 resolved to:
|
Caret 4 resolved to:
|
||||||
Nothing (Unresolved reference)
|
0: package one
|
||||||
|
|
||||||
Caret 5 resolved to:
|
Caret 5 resolved to:
|
||||||
Nothing (Unresolved reference)
|
0: package one.two
|
||||||
|
|
||||||
Caret 6 resolved to:
|
Caret 6 resolved to:
|
||||||
0: package one.two.three
|
0: package one.two.three
|
||||||
|
|||||||
Reference in New Issue
Block a user