AnnotationReference.toAnnotationSpec()
generates faulty code when argument is varargs
#687
Labels
AnnotationReference.toAnnotationSpec()
generates faulty code when argument is varargs
#687
When input annotation has vararg parameters (for example,
@Suppress
annotation),AnnotationReference.toAnnotationSpec()
will generate new annotation with named parameters, which is not valid (vararg parameters should not be named).For example,
@Suppres("unused")
will be converted to@Suppress(names = "unused")
.This will cause the compilation of the generated kotlin file to fail with the
Assigning single elements to varargs in named form is forbidden
error.The text was updated successfully, but these errors were encountered: