Restore support for recursive annotations in Kotlin #31518
Closed
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.
This PR resolves #31400 (follow up).
It effectively reverts:
(1)
This commit removed the support for cycling annotations, because it was assumed that Kotlin will no longer support them starting with
1.9.0
.Kotlin only removed support for direct cycles.
For example:
This code will not compile with >=
1.9.0
However, Kotlin did not remove support for indirect cycles.
For example:
This code is valid and will compile, because the cycle includes an array.
(2)
This commit restored part of the recursive annotation support, but missed the nested cycles. Hence, the implementation is not sufficient to support Kotlin annotations.
Please note that this PR will not add any new logic, but only restores the implementation before bf9f261