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)
|
||||
private fun findParentSymbol(symbol: KtSymbol, goBackSteps: Int, selectedFqName: FqName): KtSymbol? {
|
||||
if (symbol !is KtDeclarationSymbol) return null
|
||||
var currentSymbol: KtDeclarationSymbol? = symbol
|
||||
if (symbol !is KtDeclarationSymbol && symbol !is KtPackageSymbol) return null
|
||||
|
||||
var currentSymbol = symbol as? KtDeclarationSymbol
|
||||
repeat(goBackSteps) {
|
||||
currentSymbol = currentSymbol?.getContainingSymbol() as? KtClassOrObjectSymbol
|
||||
}
|
||||
currentSymbol?.let { return it }
|
||||
|
||||
return getPackageSymbolIfPackageExists(selectedFqName)
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -2,16 +2,16 @@ Caret 1 resolved to:
|
||||
0: package one
|
||||
|
||||
Caret 2 resolved to:
|
||||
Nothing (Unresolved reference)
|
||||
0: package one
|
||||
|
||||
Caret 3 resolved to:
|
||||
0: package one.two
|
||||
|
||||
Caret 4 resolved to:
|
||||
Nothing (Unresolved reference)
|
||||
0: package one
|
||||
|
||||
Caret 5 resolved to:
|
||||
Nothing (Unresolved reference)
|
||||
0: package one.two
|
||||
|
||||
Caret 6 resolved to:
|
||||
0: package one.two.three
|
||||
|
||||
Reference in New Issue
Block a user