diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinUnusedImportInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinUnusedImportInspection.kt index ca57ac24eb1..d8c3125285a 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinUnusedImportInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/KotlinUnusedImportInspection.kt @@ -195,14 +195,14 @@ class KotlinUnusedImportInspection : AbstractKotlinInspection() { val document = editor.document var hasErrors = false - DaemonCodeAnalyzerEx.processHighlights(document, project, HighlightSeverity.ERROR, 0, document.textLength, { highlightInfo -> + DaemonCodeAnalyzerEx.processHighlights(document, project, HighlightSeverity.ERROR, 0, document.textLength) { highlightInfo -> if (!importsRange.containsRange(highlightInfo.startOffset, highlightInfo.endOffset)) { hasErrors = true false } else { true } - }) + } if (hasErrors) return false return DaemonListeners.canChangeFileSilently(file)