Skip to content

Revert "non-falsy-string cannot be converted to 0" #3997

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

Open
wants to merge 4 commits into
base: 2.1.x
Choose a base branch
from

Conversation

VincentLanglet
Copy link
Contributor

This reverts commit f615b1a.

Copy link
Contributor

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 👍

@VincentLanglet
Copy link
Contributor Author

Friendly ping @ondrejmirtes

This PR might be forgotten since I assume it's a quick review.
It revert f615b1a as asked in #3980

(int) '00' can still be 0.

@staabm
Copy link
Contributor

staabm commented Jul 11, 2025

(int) '00' can still be 0.

Please add a test for this case so we see it next time earlier

@VincentLanglet
Copy link
Contributor Author

(int) '00' can still be 0.

Please add a test for this case so we see it next time earlier

How do you want to add such test ?

There is already a test checking that (int) non-falsy-string is an int (and I added a comment).

If I add a test for the special case '00' it will be useless since the methode used will be from ConstantStringType and not AccessoryNonFalsyStringType

@staabm
Copy link
Contributor

staabm commented Jul 11, 2025

I see, thanks for looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants