Fix addition of wrong java.lang imports on optimize imports
Add check to star importer, to not import already imported fqNames #KT-15273 fixed
This commit is contained in:
@@ -155,8 +155,10 @@ class OptimizedImportsBuilder(
|
||||
}
|
||||
else {
|
||||
descriptors
|
||||
.asSequence()
|
||||
.filterIsInstance<ClassDescriptor>()
|
||||
.mapTo(classNamesToCheck) { it.importableFqName!! }
|
||||
.map { it.importableFqName!! }
|
||||
.filterTo(classNamesToCheck) { !isImportedByDefault(it) }
|
||||
|
||||
if (!fqNames.all(this::isImportedByDefault)) {
|
||||
importsToGenerate.add(starImportPath)
|
||||
|
||||
Reference in New Issue
Block a user