Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upString.toInt "0x" == Ok NaN #949
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Mar 7, 2018
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Mar 7, 2018
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
zwilias
referenced this issue
Mar 7, 2018
Closed
String.toInt produces "Ok NaN" for some inputs #919
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Mar 7, 2018
Member
Do you mind filling in the ??? in each case? I do not understand the headers right now, but I'll get the issue if these become Err ... and Ok NaN and Ok 0 or whatever else.
|
Do you mind filling in the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zwilias
Mar 7, 2018
Member
Swapped thing around so the actual issue is on top, with output from 0.18 and the changes on the master branch included. Does this work better for you?
|
Swapped thing around so the actual issue is on top, with output from 0.18 and the changes on the master branch included. Does this work better for you? |
evancz
added
the
bug
label
Mar 7, 2018
evancz
changed the title from
`String.toInt` produces `Ok NaN`
to
String.toInt "0x" == Ok NaN
Mar 7, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rtfeldman
Aug 12, 2018
Member
These all give me Nothing on 0.19; I can't reproduce any of them anymore!
|
These all give me |
zwilias commentedMar 7, 2018
•
edited
Edited 2 times
-
zwilias
edited Mar 7, 2018 (most recent)
-
evancz
edited Mar 7, 2018
Full list of edge-cases:
https://ellie-app.com/R9mPnktLa1/0
Current problematic
String.toInt "0x"Ok NaNJust NaNFixed on master
String.toInt "+"Ok NaNNothingString.toInt "-"Ok NaNNothingEdge-cases that behave correctly
String.toInt "0X"Err "..."NothingString.toInt "0o"Err "..."NothingString.toInt "0O"Err "..."NothingString.toInt "0b"Err "..."NothingString.toInt "0B"Err "..."Nothing