-
Notifications
You must be signed in to change notification settings - Fork 832
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
ClassCastException in Node.getString #662
Comments
Can you please prepare a simple test case to make it easy for us to reproduce this. You can have a look at the packages org.mozilla.javascript.tests.es5 or org.mozilla.javascript.tests.es6 for sample tests. |
["".h]=""
// Exception in thread "main" java.lang.ClassCastException: org.mozilla.javascript.ast.StringLiteral cannot be cast to org.mozilla.javascript.ast.Name
[1..h]="" // no error
[0..toString.h] = [123] // // expect: Number.prototype.toString.h === 123
// Exception in thread "main" java.lang.NullPointerException Perhaps it has something to do with this code. rhino/src/org/mozilla/javascript/Parser.java Lines 4196 to 4205 in c275c35
|
You sure those double dots ( |
Yes. The first dot is a decimal point. The second dot is a member operator. |
Right... learned something new about JavaScript :-) |
We ran into an unexpected ClassCastException when attempting to compile the following string using Rhino 1.7.12:
["".h]=y
Output:
The text was updated successfully, but these errors were encountered: