Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 20, 2021

Backport of #59205 to release/6.0

/cc @tannergooding @7rakir

Customer Impact

Customers using the new generic math preview feature will not be able to use IParseable<float>, IParseable<double> or IParseable<Half> and have it work for anything except strings containing integers.

They would need to fallback to the parse methods exposed by INumber<T> that take a NumberStyles instead.

Testing

Additional tests were duplicated and updated to explicitly cover the generic math scenario.

Risk

Low. This is a small fix for a preview API that requires explicit opt-in to consume.

Richard Sefr and others added 3 commits September 20, 2021 15:38
IParseable<float> and IParseable<double> would fail when parsing
a decimal point number due to incorrect NumberStyles parameter.

E.g. IParseable<double>.TryParse would fail as opposed to
IParseable<double>.Parse because the former explicitly states to use
NumberStyles.Integer
@ghost ghost added the area-System.Numerics label Sep 20, 2021
@ghost
Copy link

ghost commented Sep 20, 2021

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #59205 to release/6.0

/cc @tannergooding @7rakir

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Numerics

Milestone: -

@tannergooding tannergooding added the Servicing-consider Issue for next servicing release review label Sep 20, 2021
@tannergooding
Copy link
Member

CC. @jeffhandley, @danmoseley

@danmoseley
Copy link
Member

LGTM. feel free to send mail to Steve/tactics. The key point being it's only the preview methods affected (I would have snipped out the diff for the non preview methods even though it's a no-op, but it's not important.)

@tannergooding tannergooding changed the title [release/6.0] Use correct NumberStyle when parsing double and float [release/6.0] Generic Math Preview - Use correct NumberStyle when parsing double and float Sep 20, 2021
@danmoseley danmoseley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 21, 2021
@danmoseley
Copy link
Member

was approved offline

@Anipik
Copy link
Contributor

Anipik commented Sep 21, 2021

cc @tannergooding @pgovind can you add a CR here ?

@danmoseley
Copy link
Member

reviewed

@Anipik Anipik merged commit 036cb86 into release/6.0 Sep 21, 2021
@jkotas jkotas deleted the backport/pr-59205-to-release/6.0 branch September 24, 2021 04:30
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Numerics Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants