Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Dec 10, 2025

…g a single tuple argument results in an overrun

  • Explanation:

    Fixes a crash in fixMissingArguments.

    If arguments are represented by a single tuple it's possible that the issue is not about missing parameters but instead about tuple destructuring. Fix fixMissingArguments to check for overruns after destructuring and stop if that produces more arguments then parameters because such situations are better diagnosed as a general conversion failure rather than a missing argument(s) problem.

  • Resolves: rdar://159408715

  • Main branch PR: [Diagnostics] Don't attempt to synthesize arguments when destructurin… #85939

  • Risk: Very Low. Affects only invalid code in narrow situations when one of the function types has a single tuple parameter with more elements than the other side expects.

  • Reviewed By: @hamishknight

  • Testing: Added new test-cases to the suite.

(cherry picked from commit 1f88720)

…g a single tuple argument results in an overrun

If arguments are represented by a single tuple it's possible
that the issue is not about missing parameters but instead
about tuple destructuring. Fix `fixMissingArguments` to check for
overruns after destructuring and stop if that produces more
arguments then parameters because such situations are better
diagnosed as a general conversion failure rather than a missing
argument(s) problem.

Resolves: rdar://159408715
(cherry picked from commit 1f88720)
@xedin xedin requested a review from a team as a code owner December 10, 2025 17:10
@xedin xedin added swift 6.2 🍒 release cherry pick Flag: Release branch cherry picks labels Dec 10, 2025
@xedin
Copy link
Contributor Author

xedin commented Dec 10, 2025

@swift-ci please test

@xedin xedin added swift 6.3 and removed swift 6.2 labels Dec 10, 2025
@xedin
Copy link
Contributor Author

xedin commented Dec 12, 2025

@swift-ci please smoke test macOS platform

@xedin xedin merged commit 55f4795 into swiftlang:release/6.3 Dec 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 6.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants