diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java index 9092b9edf19..3a8c2f02733 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/diagnostics/RedeclarationDiagnostic.java @@ -15,8 +15,8 @@ import static org.jetbrains.jet.lang.diagnostics.Severity.ERROR; public interface RedeclarationDiagnostic extends DiagnosticWithPsiElement { public class SimpleRedeclarationDiagnostic extends DiagnosticWithPsiElementImpl implements RedeclarationDiagnostic { - public SimpleRedeclarationDiagnostic(@NotNull PsiElement psiElement) { - super(RedeclarationDiagnosticFactory.INSTANCE, ERROR, "Redeclaration", psiElement); + public SimpleRedeclarationDiagnostic(@NotNull PsiElement psiElement, @NotNull String name) { + super(RedeclarationDiagnosticFactory.INSTANCE, ERROR, "Redeclaration: " + name, psiElement); } } @@ -66,7 +66,7 @@ public interface RedeclarationDiagnostic extends DiagnosticWithPsiElement diagnostics = Sets.newLinkedHashSet(bindingContext.getDiagnostics()); Set 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) {