diff --git a/idea/idea-core/src/org/jetbrains/kotlin/idea/core/script/dependencies/KotlinScriptDependenciesIndexableSetContributor.kt b/idea/idea-core/src/org/jetbrains/kotlin/idea/core/script/dependencies/KotlinScriptDependenciesIndexableSetContributor.kt index 8ef0204978e..4027a8fb39f 100644 --- a/idea/idea-core/src/org/jetbrains/kotlin/idea/core/script/dependencies/KotlinScriptDependenciesIndexableSetContributor.kt +++ b/idea/idea-core/src/org/jetbrains/kotlin/idea/core/script/dependencies/KotlinScriptDependenciesIndexableSetContributor.kt @@ -25,7 +25,7 @@ class KotlinScriptDependenciesIndexableSetContributor : IndexableSetContributor( override fun getAdditionalProjectRootsToIndex(project: Project): Set { val manager = ScriptDependenciesManager.getInstance(project) - return (manager.getAllScriptsClasspath() + manager.getAllLibrarySources()).toSet() + return (manager.getAllScriptsClasspath() + manager.getAllLibrarySources()).filterTo(LinkedHashSet()) { it.isValid } } override fun getAdditionalRootsToIndex(): Set = emptySet()