Add flag -Xno-new-java-annotation-targets

Do not generate TYPE_USE/TYPE_PARAMETER Java annotation targets when
this flag is specified.

 #KT-53712 Fixed
This commit is contained in:
Alexander Udalov
2022-08-26 01:03:37 +02:00
parent a09fd45ade
commit 690322b203
13 changed files with 88 additions and 7 deletions
@@ -348,6 +348,8 @@ class GenerationState private constructor(
val abiStability = configuration.get(JVMConfigurationKeys.ABI_STABILITY)
val noNewJavaAnnotationTargets = configuration.getBoolean(JVMConfigurationKeys.NO_NEW_JAVA_ANNOTATION_TARGETS)
val globalSerializationBindings = JvmSerializationBindings()
var mapInlineClass: (ClassDescriptor) -> Type = { descriptor -> typeMapper.mapType(descriptor.defaultType) }