Skip to content

Backport "Lift all non trivial prefixes for default parameters" to LTS #20967

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

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #19739 to the LTS branch.

PR submitted by the release tooling.

Checking if the prefix is pure is not enough to know if we need to list
the prefix. In the case of default parameters, the prefix tree might be
used several times to compute the default values. This expression should
only be computed once and therefore it should be lifted if there is some
computation/allocation involved. Furthermore, if the prefix contains a
local definition, it must be lifted to avoid duplicating the definition.

A similar situation could happen with dependent default parameters. This
currently works as expected.

Fixes #15315

[Cherry-picked 71b983b]
Base automatically changed from lts-18840 to lts-3.3 July 3, 2024 08:36
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-19921.

Reference

@WojciechMazur WojciechMazur merged commit e442f1f into lts-3.3 Jul 3, 2024
18 of 19 checks passed
@WojciechMazur WojciechMazur deleted the lts-19739 branch July 3, 2024 08:37
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