Fix multiple registration for redeclaration errors
This commit is contained in:
@@ -179,10 +179,12 @@ public class JetPsiChecker implements Annotator, HighlightRangeExtension {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isMarkedWithRedeclaration && Errors.REDECLARATION_DIAGNOSTICS.contains(diagnostic.getFactory())) {
|
if (Errors.REDECLARATION_DIAGNOSTICS.contains(diagnostic.getFactory())) {
|
||||||
isMarkedWithRedeclaration = true;
|
if (!isMarkedWithRedeclaration) {
|
||||||
Annotation annotation = holder.createErrorAnnotation(diagnostic.getTextRanges().get(0), "");
|
isMarkedWithRedeclaration = true;
|
||||||
setUpAnnotation(diagnostic, annotation, null);
|
Annotation annotation = holder.createErrorAnnotation(diagnostic.getTextRanges().get(0), "");
|
||||||
|
setUpAnnotation(diagnostic, annotation, null);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user