More simple code doing the same

This commit is contained in:
Valentin Kipyatkov
2015-04-08 16:40:07 +03:00
parent f6e363abb8
commit fe14107848
@@ -270,10 +270,9 @@ public class KotlinCopyPasteReferenceProcessor() : CopyPastePostProcessor<Kotlin
.filterNot { ErrorUtils.isError(it) }
.map { it.importableFqName }
.filterNotNull()
.toSet()
val originalFqName = FqName(refData.fqName)
val referencesSame = referencedFqNames.any { it == originalFqName }
val conflict = referencedFqNames.any { it != originalFqName }
if (referencesSame && !conflict) return null
if (referencedFqNames.singleOrNull() == originalFqName) return null
return ReferenceToRestoreData(reference, refData)
}