Minor, swap parameters of AnalyzerWithCompilerReport#analyzeAndReport

#KT-5459 Fixed
This commit is contained in:
Alexander Udalov
2014-07-14 21:39:26 +04:00
parent 9194b5d532
commit 35385fdd75
3 changed files with 5 additions and 5 deletions
@@ -219,7 +219,7 @@ public final class AnalyzerWithCompilerReport {
return hasErrors;
}
public void analyzeAndReport(@NotNull Function0<AnalyzeExhaust> analyzer, @NotNull Collection<JetFile> files) {
public void analyzeAndReport(@NotNull Collection<JetFile> files, @NotNull Function0<AnalyzeExhaust> analyzer) {
analyzeExhaust = analyzer.invoke();
reportAbiVersionErrors();
reportSyntaxErrors(files);
@@ -174,12 +174,12 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
private static boolean analyzeAndReportErrors(@NotNull MessageCollector messageCollector,
@NotNull final List<JetFile> sources, @NotNull final Config config) {
AnalyzerWithCompilerReport analyzerWithCompilerReport = new AnalyzerWithCompilerReport(messageCollector);
analyzerWithCompilerReport.analyzeAndReport(new Function0<AnalyzeExhaust>() {
analyzerWithCompilerReport.analyzeAndReport(sources, new Function0<AnalyzeExhaust>() {
@Override
public AnalyzeExhaust invoke() {
return AnalyzerFacadeForJS.analyzeFiles(sources, Predicates.<PsiFile>alwaysTrue(), config);
}
}, sources);
});
return analyzerWithCompilerReport.hasErrors();
}
@@ -283,7 +283,7 @@ public class KotlinToJVMBytecodeCompiler {
AnalyzerWithCompilerReport analyzerWithCompilerReport = new AnalyzerWithCompilerReport(
environment.getConfiguration().get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY));
analyzerWithCompilerReport.analyzeAndReport(
new Function0<AnalyzeExhaust>() {
environment.getSourceFiles(), new Function0<AnalyzeExhaust>() {
@NotNull
@Override
public AnalyzeExhaust invoke() {
@@ -300,7 +300,7 @@ public class KotlinToJVMBytecodeCompiler {
environment.getConfiguration().get(JVMConfigurationKeys.INCREMENTAL_CACHE_BASE_DIR)
);
}
}, environment.getSourceFiles()
}
);
AnalyzeExhaust exhaust = analyzerWithCompilerReport.getAnalyzeExhaust();