More simple code doing the same
This commit is contained in:
@@ -270,10 +270,9 @@ public class KotlinCopyPasteReferenceProcessor() : CopyPastePostProcessor<Kotlin
|
|||||||
.filterNot { ErrorUtils.isError(it) }
|
.filterNot { ErrorUtils.isError(it) }
|
||||||
.map { it.importableFqName }
|
.map { it.importableFqName }
|
||||||
.filterNotNull()
|
.filterNotNull()
|
||||||
|
.toSet()
|
||||||
val originalFqName = FqName(refData.fqName)
|
val originalFqName = FqName(refData.fqName)
|
||||||
val referencesSame = referencedFqNames.any { it == originalFqName }
|
if (referencedFqNames.singleOrNull() == originalFqName) return null
|
||||||
val conflict = referencedFqNames.any { it != originalFqName }
|
|
||||||
if (referencesSame && !conflict) return null
|
|
||||||
return ReferenceToRestoreData(reference, refData)
|
return ReferenceToRestoreData(reference, refData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user