Provide fallback flag for KT-19174

-Xno-exception-on-explicit-equals-for-boxed-null

Also unify corresponding names.
This commit is contained in:
Dmitry Petrov
2017-09-12 16:08:03 +03:00
parent 773eff1de8
commit 179e720e4a
12 changed files with 79 additions and 6 deletions
@@ -167,6 +167,12 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
)
var jsr305: String? by FreezableVar(Jsr305State.DEFAULT.description)
@Argument(
value = "-Xno-exception-on-explicit-equals-for-boxed-null",
description = "Do not throw NPE on explicit 'equals' call for null receiver of platform boxed primitive type"
)
var noExceptionOnExplicitEqualsForBoxedNull by FreezableVar(false)
// Paths to output directories for friend modules.
var friendPaths: Array<String>? by FreezableVar(null)
@@ -343,6 +343,7 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
configuration.put(JVMConfigurationKeys.DISABLE_CALL_ASSERTIONS, arguments.noCallAssertions)
configuration.put(JVMConfigurationKeys.DISABLE_RECEIVER_ASSERTIONS, arguments.noReceiverAssertions)
configuration.put(JVMConfigurationKeys.DISABLE_PARAM_ASSERTIONS, arguments.noParamAssertions)
configuration.put(JVMConfigurationKeys.NO_EXCEPTION_ON_EXPLICIT_EQUALS_FOR_BOXED_NULL, arguments.noExceptionOnExplicitEqualsForBoxedNull);
configuration.put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize)
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, arguments.inheritMultifileParts)
configuration.put(JVMConfigurationKeys.SKIP_RUNTIME_VERSION_CHECK, arguments.skipRuntimeVersionCheck)