-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toInt/toInt64 is wrong #112
Comments
The "is wrong" statement is a little bombastic -- but the current behaviour is certainly a little undocumented. But it's certainly in line with the corresponding documentation in Go's stdlib. |
Okay, thank you very much for your reply, but for special values, this will not apply and the developer needs to deal with it by himself |
@liuaiyuan this isn't my library and I did not implement these, and I would probably also prefer that they behaved the way you describe, but that would probably be too much of a breaking change. /cc @spf13 |
you could create a pr :) the problem could be fixed with changing the I did this and added to the tests for your scenario, and it works... what makes me hesitate to submit a pr is I do not know what this breaks for people, even though this "fix" is how I would expect it to work there's probably a lot I'm not considering... I modified all the "to" functions and tests, but this is part of the diff to illustrate my meaning
the new tests fail until parseint is changed, then they all succeed |
output
output
The text was updated successfully, but these errors were encountered: