Skip to content

[CSSimplify] VariadicGenerics: Don't attempt to wrap optional into on…#82326

Merged
xedin merged 1 commit into
swiftlang:mainfrom
xedin:rdar-152940244
Jun 19, 2025
Merged

[CSSimplify] VariadicGenerics: Don't attempt to wrap optional into on…#82326
xedin merged 1 commit into
swiftlang:mainfrom
xedin:rdar-152940244

Conversation

@xedin

@xedin xedin commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

…e-element tuple

If we have a tuple with unresolved pack expansion on one side and an optional type on the other, prevent matchTypes from wrapping optional into a one-element tuple because the matching should be handled as part of the optional injection.

Resolves: rdar://152940244
Resolves #82487

…e-element tuple

If we have a tuple with unresolved pack expansion on one side
and an optional type on the other, prevent `matchTypes` from
wrapping optional into a one-element tuple because the matching
should be handled as part of the optional injection.

Resolves: rdar://152940244
@xedin xedin requested a review from hborla as a code owner June 18, 2025 01:30
@xedin

xedin commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@xedin

xedin commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

@swift-ci please test macOS platform

@xedin

xedin commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

@swift-ci please test Windows platform

1 similar comment
@xedin

xedin commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

@swift-ci please test Windows platform

@xedin xedin merged commit 91ae0e0 into swiftlang:main Jun 19, 2025
5 checks passed
xedin added a commit to xedin/swift that referenced this pull request Jun 24, 2025
Follow-up for swiftlang#82326.

The optional injection is only viable is the wrapped type is
not yet resolved, otherwise it's safe to wrap the optional.
xedin added a commit to xedin/swift that referenced this pull request Jun 25, 2025
Follow-up for swiftlang#82326.

The optional injection is only viable is the wrapped type is
not yet resolved, otherwise it's safe to wrap the optional.

(cherry picked from commit 4804f21)
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.

Unexpected compiler error when calling value pack-returning function using optional chaining

2 participants