Refactoring: Remove misleading that code processes both redeclaration and shadowing

NAME_SHADOWING is a warning so it has never been handled there
This commit is contained in:
Nikolay Krasko
2013-10-23 16:03:32 +04:00
parent e96c76b0d8
commit d6821ebfb6
2 changed files with 3 additions and 5 deletions
@@ -133,8 +133,8 @@ public class JetPsiChecker implements Annotator, HighlightRangeExtension {
}
private static class ElementAnnotator {
@NotNull private final PsiElement element;
@NotNull private final AnnotationHolder holder;
private final PsiElement element;
private final AnnotationHolder holder;
private boolean isMarkedWithRedeclaration;
@@ -179,7 +179,7 @@ public class JetPsiChecker implements Annotator, HighlightRangeExtension {
return;
}
if (Errors.REDECLARATION_DIAGNOSTICS.contains(diagnostic.getFactory())) {
if (diagnostic.getFactory() == Errors.REDECLARATION) {
if (!isMarkedWithRedeclaration) {
isMarkedWithRedeclaration = true;
Annotation annotation = holder.createErrorAnnotation(diagnostic.getTextRanges().get(0), "");