Minor. Parametrize MainFunctionDetector with LanguageVersionSettings

This commit is contained in:
Denis Zharkov
2018-09-07 12:13:55 +03:00
parent bc722f9c5f
commit 38be1f6947
15 changed files with 46 additions and 19 deletions
@@ -463,7 +463,7 @@ public final class Translation {
) {
StaticContext staticContext = new StaticContext(trace, config, moduleDescriptor, sourceFilePathResolver);
TranslationContext context = TranslationContext.rootContext(staticContext);
MainFunctionDetector mainFunctionDetector = new MainFunctionDetector(context.bindingContext());
MainFunctionDetector mainFunctionDetector = new MainFunctionDetector(context.bindingContext(), config.getLanguageVersionSettings());
FunctionDescriptor functionDescriptor = mainFunctionDetector.getMainFunction(moduleDescriptor);
if (functionDescriptor == null) {
return null;