Skip to content
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

Always allow operator overloaded conversion #1099

Merged

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Mar 6, 2022

After fixing #1094 I felt that we should actually always allow implicit/explicit operators for conversion. I've adapted code to prefer ChangeType and if it doesn't succeed we can still always try operator overloading, which has semantically the same goal as supporting IConvertible. So removing checks whether operator overloading is allowed when doing interop, it's already behind allow interop flag anyway.

Thoughts @sebastienros @KurtGokhan ?

@lahma lahma added the interop label Mar 6, 2022
@KurtGokhan
Copy link
Contributor

Looks good

@lahma lahma merged commit d21f36a into sebastienros:main Mar 6, 2022
@lahma lahma deleted the allow-operator-overloaded-conversion branch March 6, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants