Fix NPE from REPL initialization

This commit is contained in:
Alexander Udalov
2015-09-14 13:23:17 +03:00
parent b4399b8b8b
commit dcd7464ae1
@@ -125,6 +125,8 @@ public open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
configuration.addAll(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, getAnnotationsPath(paths, arguments))
configuration.put(JVMConfigurationKeys.MODULE_NAME, arguments.moduleName ?: JvmAbi.DEFAULT_MODULE_NAME)
if (arguments.module == null && arguments.freeArgs.isEmpty() && !arguments.version) {
ReplFromTerminal.run(rootDisposable, configuration)
return ExitCode.OK
@@ -135,8 +137,6 @@ public open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
else
emptyList<AnalyzerScriptParameter>())
configuration.put(JVMConfigurationKeys.MODULE_NAME, arguments.moduleName ?: JvmAbi.DEFAULT_MODULE_NAME)
putAdvancedOptions(configuration, arguments)
messageSeverityCollector.report(CompilerMessageSeverity.LOGGING, "Configuring the compilation environment", CompilerMessageLocation.NO_LOCATION)