-
Notifications
You must be signed in to change notification settings - Fork 864
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
Conversation
# Conflicts: # rhino/src/main/java/org/mozilla/javascript/LambdaConstructor.java
@@ -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)); |
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.
i think we can remove the throw (at lease if there is somewhere a test for that)
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.
Looks like a miss in my editing or merging -- this should just throw a range error. Thanks!
yes please .... |
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.