-
Notifications
You must be signed in to change notification settings - Fork 506
Refacto LooseComparisonHelper #3485
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
Conversation
These things should be handled by a new method on |
05f6ec1
to
ec065d0
Compare
Hi @ondrejmirtes, I'm not sure to understand. Currently there is a
Since the same logic is needed for If I introduce a new method on Type, what do you have in mind ?
Or I could do something like
with usages like Also I was needed confirmation about if removing LooseComparisonHelper::compareConstantScalars on this PR was considered as a BC break or (If I understood correctly) it won't since there is no |
1f01bb1
to
0a8f572
Compare
0a8f572
to
7ad11d1
Compare
Friendly ping @ondrejmirtes, I think #3485 (comment) explains correctly my issue ; could you elaborate your request change.
was useful cause I could then do
if I need to compute Type:: isSmallerThanOrEqual, Type::looseCompare, ... I don't see which method I should add to Type since Also, since
I don't see a signature for The only things which could be done is moving the code from the Helper to the ConstantScalarTypeTrait... not sure it's useful. |
@staabm Maybe do you understand how I should refacto this ? |
Hi, I'd try to try moving this (and #3484) forward. |
I'll use the logic from LooseComparisonHelper in #3484
After the refacto,
compareConstantScalars
doesn't seems so useful and we could have the patternand then do the
==
,<
or<=
comparison.Still to avoid BC break, I deprecate the method
compareConstantScalars
in 1.12.x to remove it in 2.0.x.cc @staabm since you wrote this code.