8000 Improve BigInteger casting behaviours by vexx32 · Pull Request #12629 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@vexx32
Copy link
Collaborator
@vexx32 vexx32 commented May 12, 2020

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 IConvertible like other numeric types are.

Fixes #12623

PR Context

These changes were split from #11634 and will fix #12623.

PR Checklist

@ghost ghost assigned iSazonov May 12, 2020
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label May 12, 2020
@iSazonov iSazonov added this to the 7.1.0-preview.3 milestone May 12, 2020
@iSazonov iSazonov requested a review from daxian-dbw May 12, 2020 03:10
@vexx32 vexx32 force-pushed the BigIntConversions branch from f0f6880 to 89480fd Compare May 12, 2020 03:22
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author
@vexx32 vexx32 May 12, 2020

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. 😂 🍿

@vexx32 vexx32 force-pushed the BigIntConversions branch from 216d34f to 4d8b14d Compare May 12, 2020 12:36
@vexx32 vexx32 force-pushed the BigIntConversions branch 2 times, most recently from 8851360 to 1ef8c98 Compare May 13, 2020 02:28
@vexx32 vexx32 force-pushed the BigIntConversions branch from 1ef8c98 to fc6184b Compare May 13, 2020 06:17
@ghost ghost added the Review - Needed The PR is being reviewed label May 27, 2020
@ghost
Copy link
ghost commented May 27, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Mainainer, Please provide feedback and/or mark it as Waiting on Author

@iSazonov
Copy link
Collaborator

@daxian-dbw Please review.

@ghost
Copy link
ghost commented Jul 7, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@iSazonov
Copy link
Collaborator

Reopen to update CIs.

@vexx32
Copy link
Collaborator Author
vexx32 commented Jul 22, 2020

I probably need to rebase this... will have a look this afternoon :)

@ghost ghost added the Review - Needed The PR is being reviewed label Jul 30, 2020
@ghost
Copy link
ghost commented Jul 30, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@daxian-dbw
Copy link
Member

I apologize for not being able to review this in time. There are a few other @vexx32's and @iSazonov's PRs that we intended to get to but just couldn't yet ☹️ I will get to this one today.

@ghost ghost removed the Review - Needed The PR is being reviewed label Aug 3, 2020
vexx32 added 2 commits August 3, 2020 14:06
Added a few special cases and specific casting methods for BigInteger
in LanguagePrimitives' casting methods and cached conversions.

Fixes PowerShell#12623
@vexx32 vexx32 force-pushed the BigIntConversions branch from fc6184b to cb1ac80 Compare August 3, 2020 18:06
Copy link
Member
@daxian-dbw daxian-dbw left a 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>
Copy link
Member
@daxian-dbw daxian-dbw left a 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!

@iSazonov
Copy link
Collaborator
iSazonov commented Aug 4, 2020

😺 Could add cognac labels 🍷 :

  • if PR waits one month - one start
  • if PR waits 3 months - two starts
  • and so on

@iSazonov iSazonov merged commit 6aa08f9 into PowerShell:master Aug 4, 2020
@iSazonov iSazonov added this to the 7.1.0-preview.7 milestone Aug 4, 2020
@vexx32 vexx32 deleted the BigIntConversions branch August 4, 2020 13:19
@daxian-dbw
Copy link
Member

if PR waits one month - one start
if PR waits 3 months - two starts

Or use angry face 😠 instead

@iSazonov
Copy link
Collaborator
iSazonov commented Aug 4, 2020

Or use angry face 😠 instead

It is already reserved for user's Issues about bugs. :-)

@TravisEz13 TravisEz13 modified the milestones: 7.1.0-preview.7, 7.1.0-preview.6 Aug 5, 2020
@ghost
Copy link
ghost commented Aug 17, 2020

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

@ghost ghost mentioned this pull request Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigInteger casting issues

6 participants

0