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) {
|
if (importAlias != null) {
|
||||||
importAlias.nameIdentifier?.copy()?.let { element.getIdentifier()?.replace(it) }
|
importAlias.nameIdentifier?.copy()?.let { element.getIdentifier()?.replace(it) }
|
||||||
val resultDescriptor = element.resolveMainReferenceToDescriptors().firstOrNull()
|
val resultDescriptor = element.resolveMainReferenceToDescriptors().firstOrNull()
|
||||||
if (resultDescriptor == descriptor) {
|
if (descriptor.importableFqName == resultDescriptor?.importableFqName) {
|
||||||
return@forEach
|
return@forEach
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user