-
Notifications
You must be signed in to change notification settings - Fork 464
Fix floatcomp for %max #7333
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
Fix floatcomp for %max #7333
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Would you update the changelog too?
And the test output (CI is red). |
Thanks guys! @cristianoc are these supposed to be inverted? rescript/compiler/ml/translcore.ml Lines 212 to 233 in ba80b11
ie |
Likely |
@cristianoc I can see for example it's used here and bound to a "min" function. Inverting them doesn't break any tests currently but it looks like the behaviour of inverting min with max is a mistake. And I think it's safe to assume so given how it's used. This would go out of bounds if the 2 lists passed in had different lengths. rescript/runtime/Stdlib_List.res Lines 66 to 86 in 1d8560f
Would you like me to try and add a test for this |
Oops.. |
Given there's already a test whose output changes, I think that' enough. |
A very quick one 🙏🏼
Closes #7332