Improve BigInteger casting behaviours#12629
Conversation
There was a problem hiding this comment.
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
daxian-dbw
left a comment
There was a problem hiding this comment.
LGTM with a minor comment.
Co-authored-by: Ilya <[email protected]>
daxian-dbw
left a comment
There was a problem hiding this comment.
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.