Fix calling GSS.union for empty array

EA-104046
This commit is contained in:
Pavel V. Talanov
2017-07-20 18:51:50 +03:00
parent d5ca46157a
commit 8e3f8c4c14
@@ -72,7 +72,7 @@ object SourceNavigationHelper {
}
}
private fun Collection<GlobalSearchScope>.union() = GlobalSearchScope.union(this.toTypedArray())
private fun Collection<GlobalSearchScope>.union() = if (this.isNotEmpty()) GlobalSearchScope.union(this.toTypedArray()) else null
private fun haveRenamesInImports(files: Collection<KtFile>) = files.any { it.importDirectives.any { it.aliasName != null } }