optimisation: intersection with itself

This commit is contained in:
Alexey Kudravtsev
2016-07-06 14:47:42 +03:00
parent a4f529fba6
commit 1cf3d6d91b
@@ -366,7 +366,7 @@ public abstract class GlobalSearchScope extends SearchScope implements ProjectAw
@NotNull
@Override
public GlobalSearchScope intersectWith(@NotNull GlobalSearchScope scope) {
if (myScope1.equals(scope) || myScope2.equals(scope)) {
if (myScope1.equals(scope) || myScope2.equals(scope) || equals(scope)) {
return this;
}
return new IntersectionScope(this, scope, null);