From afc968fe83a31849ac97fd8695b8da8c600f655f Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Tue, 10 Nov 2015 13:38:08 +0300 Subject: [PATCH] Minor --- .../jetbrains/kotlin/idea/util/ImportInsertHelperImpl.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 }