Summary of the new feature / enhancement
The list of integer types in the following source-code location is currently missing the .NET 7+ System.Int128 and System.UInt128 types:
|
private static readonly Type[] s_integerTypes = new Type[] { |
|
typeof(Int16), typeof(Int32), typeof(Int64), |
|
typeof(UInt16), typeof(UInt32), typeof(UInt64), |
|
typeof(sbyte), typeof(byte) |
|
}; |
The absence of this type from this list means that something like [int128] '1,000', which works for all other (primitive) integer types, doesn't work.
Note that [int128] and [uint128], like [bigint], are not .NET primitive types.
There's a problem with [bigint] too, discussed in the following issue, which also touches on how the current fallback to [double]::Parse() for input strings with , is also problematic for [long] and [ulong], which would therefore also affect [int128] and [uint128]:
Proposed technical implementation details (optional)
No response
Summary of the new feature / enhancement
The list of integer types in the following source-code location is currently missing the .NET 7+
System.Int128andSystem.UInt128types:PowerShell/src/System.Management.Automation/engine/LanguagePrimitives.cs
Lines 4462 to 4466 in dd1fb91
The absence of this type from this list means that something like
[int128] '1,000', which works for all other (primitive) integer types, doesn't work.Note that
[int128]and[uint128], like[bigint], are not .NET primitive types.There's a problem with
[bigint]too, discussed in the following issue, which also touches on how the current fallback to[double]::Parse()for input strings with,is also problematic for[long]and[ulong], which would therefore also affect[int128]and[uint128]:[bigint]casting breaks with strings containing thousands separators (commas) #25368Proposed technical implementation details (optional)
No response