[6.3][CSSimplify] Parameter pack wrapping logic incorrectly considers tuple LValueTypes to not be tuples #85962 #86016
+347
−0
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.
Explanation: When passed
lvalue'd parameters, functions returning parameter packs would not flatten thelvalue'd parameters (for example passing in anything from avar), causing incorrect tuple nesting.Scope: Fixes an issue tha caused incorrect result typing for parameter pack results if a parameter is a
var. This behavior is unavoidable in ResultBuilders, causing them to be somewhat broken.Issues: Parameter packed functions pack less efficiently if the input is a
var#85924 and ResultBuilders do not produce efficient parameter pack types #85837Original PRs: [CSSimplify] Parameter pack wrapping logic incorrectly considers tuple
LValueTypes to not be tuples #85962Risk: Low/Medium - Some risk to existing code, iff it explicitly depends on the incorrect behavior. The behavior has likely been worked around already in most cases, though.
Testing: Tests for expected new/fixed behavior are in the PR, which also show #85837 to be resolved.
Reviewers: @xedin @slavapestov
(Cherry picking fe0191c)