Move: Fix exception on moving Kotlin file without declarations

#KT-14114 Fixed
This commit is contained in:
Alexey Sedunov
2016-10-03 16:41:25 +03:00
parent 9004367f3c
commit 140d0b61f1
8 changed files with 16 additions and 0 deletions
@@ -130,6 +130,8 @@ class MoveKotlinDeclarationsProcessor(
fun getConflictsAsUsages(): List<UsageInfo> = conflicts.entrySet().map { ConflictUsageInfo(it.key, it.value) }
public override fun findUsages(): Array<UsageInfo> {
if (elementsToMove.isEmpty()) return UsageInfo.EMPTY_ARRAY
val newContainerName = descriptor.moveTarget.targetContainerFqName?.asString() ?: ""
fun collectUsages(kotlinToLightElements: Map<KtNamedDeclaration, List<PsiNamedElement>>, result: MutableList<UsageInfo>) {