diff --git a/idea/src/org/jetbrains/kotlin/idea/util/ImportInsertHelperImpl.kt b/idea/src/org/jetbrains/kotlin/idea/util/ImportInsertHelperImpl.kt index 82b8bb7c7aa..c1fb2c62d9f 100644 --- a/idea/src/org/jetbrains/kotlin/idea/util/ImportInsertHelperImpl.kt +++ b/idea/src/org/jetbrains/kotlin/idea/util/ImportInsertHelperImpl.kt @@ -155,11 +155,9 @@ public class ImportInsertHelperImpl(private val project: Project) : ImportInsert is PackageViewDescriptor -> topLevelScope.findPackage(name) else -> null } - if (conflict != null && imports.any { - !it.isAllUnder() - && it.getImportPath()?.fqnPart() == conflict.importableFqName - && it.getImportPath()?.getImportedName() == name - }) { + if (conflict != null + && imports.any { !it.isAllUnder && it.importPath?.fqnPart() == conflict.importableFqName && it.importPath?.importedName == name } + ) { return ImportDescriptorResult.FAIL }