Skip to content
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

Integer.to_decimal and Float.to_decimal #9716

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Apr 16, 2024

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@GregoryTravis GregoryTravis marked this pull request as ready for review April 16, 2024 16:53
Comment on lines +850 to +851
group_builder.specify "Float.to_decimal should attach a warning" <|
Problems.expect_warning Loss_Of_Numeric_Precision (12.3 . to_decimal)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the explicit conversion should still have the warning? I guess if you do it explicitly maybe it's not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdunkerley has said that because people are often unfamiliar with the fact that Float is approximate (for example, not being able to represent 0.1 exactly), that we need these warnings always. But I think it's something we can discuss.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that's fair enough

@GregoryTravis GregoryTravis added the CI: Ready to merge This PR is eligible for automatic merge label Apr 16, 2024
@mergify mergify bot merged commit bc61d68 into develop Apr 23, 2024
35 of 36 checks passed
@mergify mergify bot deleted the wip/gmt/8982-int-float-to-decimal branch April 23, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants