Command-line option disabling KotlinNothingValueException generation

This commit is contained in:
Dmitry Petrov
2020-04-16 17:04:47 +03:00
parent 3c4e691e62
commit ac5411c32e
6 changed files with 16 additions and 1 deletions
@@ -347,6 +347,12 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
)
var noOptimizedCallableReferences: Boolean by FreezableVar(false)
@Argument(
value = "-Xno-kotlin-nothing-value-exception",
description = "Do not use KotlinNothingValueException available since 1.4"
)
var noKotlinNothingValueException: Boolean by FreezableVar(false)
override fun configureAnalysisFlags(collector: MessageCollector): MutableMap<AnalysisFlag<*>, Any> {
val result = super.configureAnalysisFlags(collector)
result[JvmAnalysisFlags.strictMetadataVersionSemantics] = strictMetadataVersionSemantics