Always return identifier from handleElementRename() (KT-14358)
Returning reference will lead to replacing identifier with reference, that result bad psi, bad stubs, and failure at some point. #KT-14358 Fixed
This commit is contained in:
+2
-2
@@ -49,9 +49,9 @@ class AndroidSimpleNameReferenceExtension : SimpleNameReferenceExtension {
|
|||||||
}
|
}
|
||||||
else if (isLayoutPackageIdentifier(reference)) {
|
else if (isLayoutPackageIdentifier(reference)) {
|
||||||
return if (newElementName.endsWith(".xml"))
|
return if (newElementName.endsWith(".xml"))
|
||||||
psiFactory.createSimpleName(newElementName.dropLast(".xml".length))
|
psiFactory.createSimpleName(newElementName.dropLast(".xml".length)).getIdentifier()
|
||||||
else
|
else
|
||||||
reference.element
|
reference.element.getIdentifier()
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user