-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Fix primitive operations on Long with Float #7435
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
I have signed the CLA now. |
Would be good to add a test case from the original issue to make sure it's fixed and stays fixed. |
@densh good idea, I will add it. |
Should this be backported to scala 2.12.x too? |
@hepin1989 Since this is a bug, so backport will be good. |
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.
Thanks!
(For symmetry with case INT
above, an equivalent patch would be to change the else if
to
else if (other.isRealType) other
.)
gah, I meant to ask for test coverage, but I hit "merge" instead. oh well @satansk if you submit a 2.12.x backport that also includes test coverage, it will be merged forward onto 2.13.x as well |
The result must be BTypes.FLOAT instead of BTypes.DOUBLE. This implementation incorporates the suggestion at scala#7435 (review).
The result must be BTypes.FLOAT instead of BTypes.DOUBLE. This implementation incorporates the suggestion at scala#7435 (review). It also adds unit tests for BTypes.LONG receivers of this method.
The result must be BTypes.FLOAT instead of BTypes.DOUBLE. This implementation incorporates the suggestion at scala#7435 (review). It also adds unit tests for BTypes.LONG receivers of this method.
Fix scala/bug#11253, according to @sjrd 's comments, modify
maxValueType
should fix the problem.