Fix CCE in move-refactoring
It happens when companion object's descriptor doesn't correspond to PSI object declaration #EA-126981 fixed
This commit is contained in:
@@ -128,7 +128,8 @@ fun KtElement.processInternalReferencesToUpdateOnPackageNameChange(
|
||||
if (descriptor.isCompanionObject()
|
||||
&& bindingContext[BindingContext.SHORT_REFERENCE_TO_COMPANION_OBJECT, refExpr] != null
|
||||
) {
|
||||
result = (result as KtObjectDeclaration).containingClassOrObject ?: result
|
||||
if (result !is KtObjectDeclaration) return@lazy null
|
||||
result = result.containingClassOrObject ?: result
|
||||
}
|
||||
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user