-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Improve BigInteger casting behaviours #12629
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
Conversation
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.
My ask dotnet/runtime#36264
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.
I'm curious as to their response, but I think it's unlikely it'll change overall. If BigInteger gets to be IConvertible, sooner or later someone's gonna come along and ask if System.Numerics.Complex should be as well, and... let's just say I'll be watching that debate from the sidelines. 😂 🍿
8851360 to
1ef8c98
Compare
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@daxian-dbw Please review. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
Reopen to update CIs. |
|
I probably need to rebase this... will have a look this afternoon :) |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Added a few special cases and specific casting methods for BigInteger in LanguagePrimitives' casting methods and cached conversions. Fixes PowerShell#12623
fc6184b to
cb1ac80
Compare
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.
LGTM with a minor comment.
Co-authored-by: Ilya <darpa@yandex.ru>
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.
Perfect, thanks! I appreciate your patience!
|
😺 Could add cognac labels 🍷 :
|
Or use angry face 😠 instead |
It is already reserved for user's Issues about bugs. :-) |
|
🎉 Handy links: |
PR Summary
Added a few special cases and specific casting methods for BigInteger in LanguagePrimitives' casting methods and cached conversions.
Specific conversion paths for boolean & nulls were added, and conversions added to the cache. Also, some existing conversion paths were modified to add special cases for BigInteger, which are needed because it's not
IConvertiblelike other numeric types are.Fixes #12623
PR Context
These changes were split from #11634 and will fix #12623.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.