Skip to content

Use OverloadResolutionPriorityAttribute to prioritise generic Using overloads - #4951

Merged
manfred-brands merged 1 commit into
mainfrom
Issue4916_OverloadResolutionPriority
Apr 5, 2025
Merged

manfred-brands merged 1 commit into
mainfrom
Issue4916_OverloadResolutionPriority

Conversation

@manfred-brands

Copy link
Copy Markdown
Member

Fixes #4916

Only if test-code compiled with 9.0.200 (or later)

@manfred-brands
manfred-brands requested a review from jnm2 March 3, 2025 10:10
…verloads

Only supply own copy of OverloadResolutionPriorityAttribute if TFM is less than NET9.0
@manfred-brands
manfred-brands force-pushed the Issue4916_OverloadResolutionPriority branch from f4c7485 to 1ab4dfe Compare March 23, 2025 09:42
@manfred-brands

Copy link
Copy Markdown
Member Author

@jnm2 Did you want any other changes?

@jnm2

jnm2 commented Mar 23, 2025

Copy link
Copy Markdown
Contributor

Looks good to me. I will just caution what I said earlier, which is that the tradeoff with this approach is that it has no effect for people who are using a langversion < 13.

@manfred-brands
manfred-brands merged commit d70b7ea into main Apr 5, 2025
@manfred-brands
manfred-brands deleted the Issue4916_OverloadResolutionPriority branch April 5, 2025 09:03
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.

Is.EqualTo(double).Using(EqualityComparer<double>) causes overload ambiguity error

3 participants