Report ABI version errors before diagnostics and other errors

Otherwise they're difficult to find in the end of the compiler messages
This commit is contained in:
Alexander Udalov
2014-05-20 16:13:45 +04:00
parent c56b5bfd61
commit 4e8d6d4882
2 changed files with 6 additions and 5 deletions
@@ -223,17 +223,18 @@ public final class AnalyzerWithCompilerReport {
}
public void analyzeAndReport(@NotNull Function0<AnalyzeExhaust> analyzer, @NotNull Collection<JetFile> files) {
reportSyntaxErrors(files);
analyzeExhaust = analyzer.invoke();
reportAbiVersionErrors();
reportSyntaxErrors(files);
//noinspection ConstantConditions
reportDiagnostics(analyzeExhaust.getBindingContext(), messageCollectorWrapper);
reportIncompleteHierarchies();
reportAlternativeSignatureErrors();
reportAbiVersionErrors();
}
private static class MyDiagnostic<E extends PsiElement> extends SimpleDiagnostic<E> {
private String message;
private final String message;
public MyDiagnostic(@NotNull E psiElement, @NotNull DiagnosticFactory0<E> factory, String message) {
super(psiElement, factory, Severity.ERROR);