Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport "Some fixes for AnnotatedTypes mapping" to LTS #22124

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #19957 to the 3.3.5.

PR submitted by the release tooling.
[skip ci]

`Annotation.mapWith` maps an `Annotation` with a type map `tm`. As an optimization, this function first checks if `tm` would result in any change (by traversing the annotation’s argument trees with a `TreeAccumulator`) before applying `tm` to the whole annotation tree. This optimization had two problems: 1. it didn’t include type parameters, and  2. it used `frozen_=:=` to compare types, which didn’t work as expected with `NoType`. This commit fixes these issues.

Additionally, positions of trees that appear only inside `AnnotatedType` were not pickled. This commit also fixes this.

[Cherry-picked ac76938]
Base automatically changed from backport-lts-3.3-21362 to lts-3.3 December 4, 2024 17:21
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to backport-lts-3.3-21857.

Reference

@WojciechMazur WojciechMazur merged commit c3bc662 into lts-3.3 Dec 4, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the backport-lts-3.3-19957 branch December 4, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants