Skip to content

Format fallback parameter names with the invariant culture - #1897

Merged
SimonCropp merged 1 commit into
mainfrom
fix-numeric-parameter-culture
Aug 29, 2026
Merged

Format fallback parameter names with the invariant culture#1897
SimonCropp merged 1 commit into
mainfrom
fix-numeric-parameter-culture

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

parameterToNameLookup pins invariant formatting for the common types, but not sbyte, Int128, UInt128, BigInteger, nint or nuint. Those fell through to parameter.ToString(), which uses the ambient culture: under sv-SE with ICU ((sbyte)-5).ToString() is '\u22125' with U+2212 MINUS SIGN, so a theory parameterised on a negative value of one of those types named its received and verified files differently than the same test on CI.

Fixed at the fallback rather than by extending the type list, so any formattable type is covered instead of only the ones someone remembered to add.

parameterToNameLookup pins invariant formatting for the common types, but not
sbyte, Int128, UInt128, BigInteger, nint or nuint. Those fell through to
parameter.ToString(), which uses the ambient culture: under sv-SE with ICU
((sbyte)-5).ToString() is '\u22125' with U+2212 MINUS SIGN, so a theory
parameterised on a negative value of one of those types named its received and
verified files differently than the same test on CI.

Fixed at the fallback rather than by extending the type list, so any formattable
type is covered instead of only the ones someone remembered to add.
@SimonCropp SimonCropp added this to the 33.0.0 milestone Aug 29, 2026
@SimonCropp
SimonCropp merged commit 2a50ae9 into main Aug 29, 2026
7 checks passed
@SimonCropp
SimonCropp deleted the fix-numeric-parameter-culture branch August 29, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant