[FIR IDE] Treat enum entry members as local in AAPI/FE10
This commit partially fixes KtFe10SymbolByPsiTestGenerated.testEnumValueMember().
This commit is contained in:
+11
-1
@@ -303,7 +303,17 @@ internal fun CallableMemberDescriptor.calculateCallableId(allowLocal: Boolean):
|
|||||||
pathToLocal = if (localName.isNotEmpty()) FqName.fromSegments(localName.asReversed()) else null
|
pathToLocal = if (localName.isNotEmpty()) FqName.fromSegments(localName.asReversed()) else null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
is ClassDescriptor -> className += current.name.asString()
|
is ClassDescriptor -> {
|
||||||
|
if (current.kind == ClassKind.ENUM_ENTRY) {
|
||||||
|
if (!allowLocal) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
localName += current.name.asString()
|
||||||
|
} else {
|
||||||
|
className += current.name.asString()
|
||||||
|
}
|
||||||
|
}
|
||||||
is PropertyAccessorDescriptor -> {} // Filter out property accessors
|
is PropertyAccessorDescriptor -> {} // Filter out property accessors
|
||||||
is CallableDescriptor -> {
|
is CallableDescriptor -> {
|
||||||
if (!allowLocal) {
|
if (!allowLocal) {
|
||||||
|
|||||||
+4
-4
@@ -92,18 +92,18 @@ internal fun KtDeclaration.calculateCallableId(allowLocal: Boolean): CallableId?
|
|||||||
|
|
||||||
while (current != null) {
|
while (current != null) {
|
||||||
when (current) {
|
when (current) {
|
||||||
is KtClassOrObject -> {
|
|
||||||
className += current.name ?: return null
|
|
||||||
}
|
|
||||||
is KtPropertyAccessor -> {
|
is KtPropertyAccessor -> {
|
||||||
// Filter out property accessors
|
// Filter out property accessors
|
||||||
}
|
}
|
||||||
is KtCallableDeclaration -> {
|
is KtCallableDeclaration, is KtEnumEntry -> {
|
||||||
if (!allowLocal) {
|
if (!allowLocal) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
localName += current.name ?: return null
|
localName += current.name ?: return null
|
||||||
}
|
}
|
||||||
|
is KtClassOrObject -> {
|
||||||
|
className += current.name ?: return null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
current = current.getElementParentDeclaration()
|
current = current.getElementParentDeclaration()
|
||||||
|
|||||||
Reference in New Issue
Block a user