Support type annotations
#KT-35843 Fixed
This commit is contained in:
+6
@@ -289,6 +289,12 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
)
|
||||
var allowNoSourceFiles: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xemit-jvm-type-annotations",
|
||||
description = "Emit JVM type annotations in bytecode"
|
||||
)
|
||||
var emitJvmTypeAnnotations: Boolean by FreezableVar(false)
|
||||
|
||||
override fun configureAnalysisFlags(collector: MessageCollector): MutableMap<AnalysisFlag<*>, Any> {
|
||||
val result = super.configureAnalysisFlags(collector)
|
||||
result[JvmAnalysisFlags.strictMetadataVersionSemantics] = strictMetadataVersionSemantics
|
||||
|
||||
@@ -152,6 +152,7 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr
|
||||
arguments.noExceptionOnExplicitEqualsForBoxedNull
|
||||
)
|
||||
put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize)
|
||||
put(JVMConfigurationKeys.EMIT_JVM_TYPE_ANNOTATIONS, arguments.emitJvmTypeAnnotations)
|
||||
|
||||
if (!JVMConstructorCallNormalizationMode.isSupportedValue(arguments.constructorCallNormalizationMode)) {
|
||||
getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY).report(
|
||||
|
||||
Reference in New Issue
Block a user