Fix AutoImport for import with alias
#KT-30663 Fixed
This commit is contained in:
@@ -219,7 +219,7 @@ class KotlinAddImportAction internal constructor(
|
||||
if (importAlias != null) {
|
||||
importAlias.nameIdentifier?.copy()?.let { element.getIdentifier()?.replace(it) }
|
||||
val resultDescriptor = element.resolveMainReferenceToDescriptors().firstOrNull()
|
||||
if (resultDescriptor == descriptor) {
|
||||
if (descriptor.importableFqName == resultDescriptor?.importableFqName) {
|
||||
return@forEach
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user