Redeclarations now report the redeclared name

This commit is contained in:
Andrey Breslav
2011-10-28 23:11:14 +04:00
parent d0b0d5f265
commit 473779befa
4 changed files with 7 additions and 7 deletions
@@ -60,7 +60,7 @@ public class JetPsiChecker implements Annotator {
Collection<Diagnostic> diagnostics = Sets.newLinkedHashSet(bindingContext.getDiagnostics());
Set<PsiElement> redeclarations = Sets.newHashSet();
for (Diagnostic diagnostic : diagnostics) {
if (diagnostic.getFactory().getPsiFile(diagnostic) != file) continue;
if (diagnostic.getFactory().getPsiFile(diagnostic) != file) continue; // This is needed because we have the same context for all files
Annotation annotation = null;
if (diagnostic.getSeverity() == Severity.ERROR) {
if (diagnostic instanceof UnresolvedReferenceDiagnostic) {