Skip to content

Fix #20335: Try extensions for arguments with type mismatch error #23212

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Alex1005a
Copy link
Contributor

Fixes #20335
The problem seems to be that the compiler does not try to look for extensions and implicit conversions in case of an error, which is generally correct, for performance reasons. But if the argument type does not match the one the function expects, it is correct to try to find an extension with the appropriate type.

Copy link
Member

@noti0na1 noti0na1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than @som-snytt 's comment, LGTM!

@noti0na1
Copy link
Member

Can you create a test using the code from the issue? thanks

@Alex1005a Alex1005a requested a review from noti0na1 May 21, 2025 19: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.

Extension method overload not picked up when parameter is conditional
3 participants