Skip to content

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

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

kun-song
Copy link
Contributor

Fix scala/bug#11253, according to @sjrd 's comments, modify maxValueType should fix the problem.

@scala-jenkins scala-jenkins added this to the 2.13.0-RC1 milestone Nov 15, 2018
@kun-song
Copy link
Contributor Author

I have signed the CLA now.

@densh
Copy link
Contributor

densh commented Nov 15, 2018

Would be good to add a test case from the original issue to make sure it's fixed and stays fixed.

@kun-song
Copy link
Contributor Author

@densh good idea, I will add it.

@He-Pin
Copy link
Contributor

He-Pin commented Nov 16, 2018

Should this be backported to scala 2.12.x too?

@kun-song
Copy link
Contributor Author

@hepin1989 Since this is a bug, so backport will be good.

Copy link
Contributor

@adriaanm adriaanm left a 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.)

@SethTisue SethTisue merged commit f869928 into scala:2.13.x Dec 4, 2018
@SethTisue
Copy link
Member

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

GreenRecycleBin added a commit to GreenRecycleBin/scala that referenced this pull request Sep 5, 2021
The result must be BTypes.FLOAT instead of BTypes.DOUBLE.

This implementation incorporates the suggestion at
scala#7435 (review).
GreenRecycleBin added a commit to GreenRecycleBin/scala that referenced this pull request Sep 5, 2021
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.
GreenRecycleBin added a commit to GreenRecycleBin/scala that referenced this pull request Sep 5, 2021
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.
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.

Primitive operations on Long with Float argument have different semantics from Java
6 participants