Skip to content

Primitive operations on Long with Float argument have different semantics from Java #5441

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

Closed
densh opened this issue Nov 14, 2018 · 0 comments

Comments

@densh
Copy link

densh commented Nov 14, 2018

Scala 2's primitive binary operations on Long that take Float (e.g. (x: Long) % (y: Float)) as an argument erroneously perform an operation in double precision, instead of float precision. This is inconsistent wrt Java semantics. Given that dotty reuses Scala 2's backend I expect it to have the same issue.

More details on reproduction here: scala/bug#11253

prolativ added a commit to prolativ/dotty that referenced this issue Oct 7, 2020
prolativ added a commit to prolativ/dotty that referenced this issue Oct 7, 2020
prolativ added a commit to prolativ/dotty that referenced this issue Oct 7, 2020
@smarter smarter closed this as completed in 9d96d4b Oct 8, 2020
smarter added a commit that referenced this issue Oct 8, 2020
Fix #5441: Primitive operations on Long with Float argument have different semantics from Java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants