Skip to content

[CSBindings] Don't prioritize closures that are assigned to overloade… #76115

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
Aug 28, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 27, 2024

…d members

Constraint generation uses a special pattern while generating constraints
for assignments to make sure that the source type is convertible to r-value
type of the destination.

BindingSet::favoredOverDisjunction needs to recognize this pattern,
where disjunction type variable is bound early, and avoid prioritizing
closure if it's connected to the "fixed type" of the disjunction or risk
losing annotations associated with the member such as @Sendable
or a global actor.

Resolves: rdar://131524246

…d members

Constraint generation uses a special pattern while generating
constraints for assignments to make sure that the source type
is convertible to r-value type of the destination.

`BindingSet::favoredOverDisjunction` needs to recognize this
pattern, where disjunction type variable is bound early, and
avoid prioritizing closure if it's connected to the "fixed type"
of the disjunction or risk losing annotations associated with
the member such as `@Sendable` or a global actor.

Resolves: rdar://131524246
@xedin xedin requested review from ktoso and hborla as code owners August 27, 2024 23:27
@xedin
Copy link
Contributor Author

xedin commented Aug 27, 2024

@swift-ci please test

@xedin xedin merged commit 00eee36 into swiftlang:main Aug 28, 2024
5 checks passed
xedin added a commit to xedin/swift that referenced this pull request Aug 30, 2024
…text

Re-implements swiftlang#76115 in
a simpler fashion now that we don't have to eagerly binding destination
type on l-value.
xedin added a commit to xedin/swift that referenced this pull request Aug 30, 2024
…text

Re-implements swiftlang#76115 in
a simpler fashion now that we don't have to eagerly binding destination
type on l-value.
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