Skip to content

[5.9][ConstraintSystem] Use fallback type constraint to default pack expansion #66709

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

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 16, 2023

Cherry-pick of #66708


  • Explanation:

Binding of pack expansion types is delayed until solving but use of Defaultable
was preventing it from being considered early because that constraint impacts
binding set ranking, switching to FallbackType constraint give us better semantics
where pack expansion type variables are going to be bound as soon as they have
a contextual type.

Resolves: rdar://110819621

(cherry picked from commit c0d0908) (cherry picked from commit 4823bf2)

@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Jun 16, 2023
@xedin xedin requested a review from hborla June 16, 2023 16:46
@xedin xedin requested a review from a team as a code owner June 16, 2023 16:46
@xedin
Copy link
Contributor Author

xedin commented Jun 16, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 16, 2023

@swift-ci please nominate

…sion

- Introduces a generalized version of `DefaultClosureType` constraint.

- Binding of pack expansion types is delayed until solving but use
  of `Defaultable` was preventing it from being considered early
  because that constraint impacts binding set ranking, switching
  to `FallbackType` constraint give us better semantics where pack
  expansion type variables are going to be bound as soon as they
  have a contextual type.

Resolves: rdar://110819621

(cherry picked from commit c0d0908)
(cherry picked from commit 4823bf2)
@xedin xedin force-pushed the fix-late-binding-of-pack-expansions-5.9 branch from d53c4ae to fae9a2e Compare June 16, 2023 18:16
@xedin
Copy link
Contributor Author

xedin commented Jun 16, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 16, 2023

@swift-ci please test Windows platform

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Jun 16, 2023

@swift-ci please test Windows platform

@xedin xedin merged commit 4ed65f8 into swiftlang:release/5.9 Jun 17, 2023
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 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants