Fix NPE from REPL initialization
This commit is contained in:
@@ -125,6 +125,8 @@ public open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
|||||||
|
|
||||||
configuration.addAll(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, getAnnotationsPath(paths, arguments))
|
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) {
|
if (arguments.module == null && arguments.freeArgs.isEmpty() && !arguments.version) {
|
||||||
ReplFromTerminal.run(rootDisposable, configuration)
|
ReplFromTerminal.run(rootDisposable, configuration)
|
||||||
return ExitCode.OK
|
return ExitCode.OK
|
||||||
@@ -135,8 +137,6 @@ public open class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
|||||||
else
|
else
|
||||||
emptyList<AnalyzerScriptParameter>())
|
emptyList<AnalyzerScriptParameter>())
|
||||||
|
|
||||||
configuration.put(JVMConfigurationKeys.MODULE_NAME, arguments.moduleName ?: JvmAbi.DEFAULT_MODULE_NAME)
|
|
||||||
|
|
||||||
putAdvancedOptions(configuration, arguments)
|
putAdvancedOptions(configuration, arguments)
|
||||||
|
|
||||||
messageSeverityCollector.report(CompilerMessageSeverity.LOGGING, "Configuring the compilation environment", CompilerMessageLocation.NO_LOCATION)
|
messageSeverityCollector.report(CompilerMessageSeverity.LOGGING, "Configuring the compilation environment", CompilerMessageLocation.NO_LOCATION)
|
||||||
|
|||||||
Reference in New Issue
Block a user