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

Implement number classes using lambdas #1808

Merged
merged 9 commits into from
Feb 5, 2025

Conversation

gbrail
Copy link
Collaborator

@gbrail gbrail commented Feb 1, 2025

Next step in the push to move away from IdScriptableObject is to switch the implementations of Number, BigInteger, and Boolean to be based on lambdas.

@gbrail gbrail marked this pull request as ready for review February 2, 2025 01:08
@@ -1076,7 +1076,8 @@ public static String toString(double val) {

public static String numberToString(double d, int base) {
if ((base < 2) || (base > 36)) {
throw Context.reportRuntimeErrorById("msg.bad.radix", Integer.toString(base));
// throw Context.reportRuntimeErrorById("msg.bad.radix", Integer.toString(base));
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we can remove the throw (at lease if there is somewhere a test for that)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like a miss in my editing or merging -- this should just throw a range error. Thanks!

@rbri
Copy link
Collaborator

rbri commented Feb 3, 2025

yes please ....

@gbrail gbrail merged commit 030acb5 into mozilla:master Feb 5, 2025
3 checks passed
@gbrail gbrail deleted the greg-more-lambdas-2 branch February 5, 2025 03:23
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.

2 participants