[SR-187] Incorrect behavior for Int(_, radix:) #42809
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
good first issue
Good for newcomers
standard library
Area: Standard library umbrella
Additional Detail from JIRA
md5: 83c44df492df40d194828ff6d075d8fc
Issue Description:
The docs for
Int(_, radix:)
lists the regex as beingbut the exact regex for the code as is seems to be
That is, it accepts these cases beyond what the docs specify:
Any number of minuses followed by a 0
A minus followed by a plus followed by any number
It seems unlikely this is by design, and contradicts the documentation by not returning nil in those cases.
The text was updated successfully, but these errors were encountered: