diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index c8b1a5177bdc..bb2b6370aafc 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -117,7 +117,7 @@ public class UsageViewImpl implements UsageView { if (o1 == o2) return 0; if (o1 == NULL_NODE) return -1; if (o2 == NULL_NODE) return 1; - if (o1 instanceof Comparable && o2 instanceof Comparable) { + if (o1 instanceof Comparable && o2 instanceof Comparable && o1.getClass() == o2.getClass()) { //noinspection unchecked final int selfcompared = ((Comparable)o1).compareTo(o2); if (selfcompared != 0) return selfcompared;