-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
In Windows PowerShell, this used to properly parse a string as a BigInt:
$num1 = [BigInt] "962822088399213984108510902933777372323"
Example:
PS C:\Users\lee> Trace-Command TypeConversion -PSHost { $num1 = [BigInt] "962822088399213984108510902933777372323" }
DEBUG: TypeConversion Information: 0 : Parse result: 962822088399213984108510902933777372323
In PowerShell, this now incorrectly converts first to an integer and will likely break anybody using BigInt:
[D:\Lee\Cookbook4\windows-powershell-cookbook-4e]
PS:67 > $num1 = [BigInt] "962822088399213984108510902933777372323"
[D:\Lee\Cookbook4\windows-powershell-cookbook-4e]
PS:68 > $num1
962822088399213912109618944997163270144
[D:\Lee\Cookbook4\windows-powershell-cookbook-4e]
PS:69 > Trace-Command TypeConversion -PSHost { $num1 = [BigInt] "962822088399213984108510902933777372323" }
DEBUG: 2021-02-18 10:37:04.9108 TypeConversion Information: 0 : Converting to integer.
DEBUG: 2021-02-18 10:37:04.9122 TypeConversion Information: 0 : Converting "9.628220883992139E+38" to "System.Numerics.BigInteger".
DEBUG: 2021-02-18 10:37:04.9132 TypeConversion Information: 0 : Constructor result: "962822088399213912109618944997163270144".
mklement0
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime