Minor, swap parameters of AnalyzerWithCompilerReport#analyzeAndReport
#KT-5459 Fixed
This commit is contained in:
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user