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;
|
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();
|
analyzeExhaust = analyzer.invoke();
|
||||||
reportAbiVersionErrors();
|
reportAbiVersionErrors();
|
||||||
reportSyntaxErrors(files);
|
reportSyntaxErrors(files);
|
||||||
|
|||||||
@@ -174,12 +174,12 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
|||||||
private static boolean analyzeAndReportErrors(@NotNull MessageCollector messageCollector,
|
private static boolean analyzeAndReportErrors(@NotNull MessageCollector messageCollector,
|
||||||
@NotNull final List<JetFile> sources, @NotNull final Config config) {
|
@NotNull final List<JetFile> sources, @NotNull final Config config) {
|
||||||
AnalyzerWithCompilerReport analyzerWithCompilerReport = new AnalyzerWithCompilerReport(messageCollector);
|
AnalyzerWithCompilerReport analyzerWithCompilerReport = new AnalyzerWithCompilerReport(messageCollector);
|
||||||
analyzerWithCompilerReport.analyzeAndReport(new Function0<AnalyzeExhaust>() {
|
analyzerWithCompilerReport.analyzeAndReport(sources, new Function0<AnalyzeExhaust>() {
|
||||||
@Override
|
@Override
|
||||||
public AnalyzeExhaust invoke() {
|
public AnalyzeExhaust invoke() {
|
||||||
return AnalyzerFacadeForJS.analyzeFiles(sources, Predicates.<PsiFile>alwaysTrue(), config);
|
return AnalyzerFacadeForJS.analyzeFiles(sources, Predicates.<PsiFile>alwaysTrue(), config);
|
||||||
}
|
}
|
||||||
}, sources);
|
});
|
||||||
return analyzerWithCompilerReport.hasErrors();
|
return analyzerWithCompilerReport.hasErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -283,7 +283,7 @@ public class KotlinToJVMBytecodeCompiler {
|
|||||||
AnalyzerWithCompilerReport analyzerWithCompilerReport = new AnalyzerWithCompilerReport(
|
AnalyzerWithCompilerReport analyzerWithCompilerReport = new AnalyzerWithCompilerReport(
|
||||||
environment.getConfiguration().get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY));
|
environment.getConfiguration().get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY));
|
||||||
analyzerWithCompilerReport.analyzeAndReport(
|
analyzerWithCompilerReport.analyzeAndReport(
|
||||||
new Function0<AnalyzeExhaust>() {
|
environment.getSourceFiles(), new Function0<AnalyzeExhaust>() {
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public AnalyzeExhaust invoke() {
|
public AnalyzeExhaust invoke() {
|
||||||
@@ -300,7 +300,7 @@ public class KotlinToJVMBytecodeCompiler {
|
|||||||
environment.getConfiguration().get(JVMConfigurationKeys.INCREMENTAL_CACHE_BASE_DIR)
|
environment.getConfiguration().get(JVMConfigurationKeys.INCREMENTAL_CACHE_BASE_DIR)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, environment.getSourceFiles()
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
AnalyzeExhaust exhaust = analyzerWithCompilerReport.getAnalyzeExhaust();
|
AnalyzeExhaust exhaust = analyzerWithCompilerReport.getAnalyzeExhaust();
|
||||||
|
|||||||
Reference in New Issue
Block a user