Commit Graph

1 Commits

Author SHA1 Message Date
Pavel Yaskevich
c8690b34e7 [CSBindings] Don't prioritize closures that are assigned to overloaded 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
2024-08-27 16:19:29 -07:00