-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SR-14280][CSSimplify] Increase the score when matching functions with different representations for contextual type #36208
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
[SR-14280][CSSimplify] Increase the score when matching functions with different representations for contextual type #36208
Conversation
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does make sense to prefer the same representation if possible, thank you!
@swift-ci Please test Windows platform |
@swift-ci Please smoke test macOS platform |
…t representations for contextual type
8b2d254
to
f5f7204
Compare
@swift-ci Please smoke test |
@swift-ci please smoke test Windows platform |
@swift-ci please test source compatibility |
@swift-ci Please test Windows Platform |
@swift-ci Please test source compatibility Release |
Thanks @xedin :) |
Thank you! Don't forget to resolve the SR. |
It does make sense to favor the same representation of contextual type, so increase the score when a function type is matching with different representations to avoid ambiguity. In this example, solver finds both bindings
(@convention(block) () -> Void)?
and(() -> ())?
. Let me know what you think :)Resolves: SR-14280
Resolves: rdar://74877828