Fix checking for annotations when rendering constructor keyword #3523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3426
There are 2 cases when annotation is not rendered and so no
constructor
keyword should be rendered:MustBeDocumented
Deprecated
)Note: PR has small API/ABI changes (no breaking changes), that's because ignored annotations are ignored later in pipeline, only during rendering. We can't ignore annotations in
JvmSignatureUtils
, as we need all annotations in other places to make a special handling of those ignored annotations (likeDeprecated
).Also, we can introduce something like
Annotation.shouldBeRendered
instead ofAnnotation.isIgnored
insideJvmSignatureUtils
, but to use it under the hood inannotationsInline
/annotationsBlock
we will need to break API/ABI (or introduce new declaration + deprecate old one) as on current momentignored
annotations there provided explicitly...So I've decided not to go this road.
If we think that it's fine to break API/ABI in
JvmSignatureUtils
and its inheritors (can be seen in API dump changes), then I can update PR.