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

Replace method.static with method["static"] and similar #2013

Closed
alexo opened this issue Jan 7, 2012 · 7 comments
Closed

Replace method.static with method["static"] and similar #2013

alexo opened this issue Jan 7, 2012 · 7 comments
Labels

Comments

@alexo
Copy link

alexo commented Jan 7, 2012

There is a problem interpreting this kind of code with Rhino:

if (method.static) 

This can be found in nodes.js (line #680, #1175, #1536 and so on - from 1.2.0 distribution)

It seems that static is a reserved keyword. As a result interpreting it with Rhino fails.
There are several appearances of such construction which can be easily replaced with

method["static"]

or instead of static use a different property name.

Thanks,
Alex

@michaelficarra
Copy link
Collaborator

static is only a future reserved word when used in strict mode code. Either use the a['static'] dynamic member access or don't use strict mode.

@ghost
Copy link

ghost commented Jan 7, 2012

@alexo Which version of Rhino are you using? 1.7R2 prohibits using ES 3 reserved words as property names; the latest release, 1.7R3, fixes this.

@alexo
Copy link
Author

alexo commented Jan 7, 2012

I'm using 1.7R2. Unfortunatelly I can't migrate to newer version.

On 7 Jan 2012 19:18, "Kit Cambridge" <
reply@reply.github.com>
wrote:

@alexo Which version of Rhino are you using? 1.7R2 prohibits using ES 3
reserved words as identifiers; the latest release, 1.7R3, fixes this.


Reply to this email directly or view it on GitHub:
#2013 (comment)

@alexo
Copy link
Author

alexo commented Jan 7, 2012

I see now that it was marked as invalid, but don't understand why? I just use the final distribution with rhino 1.7R2 and it doesn't work because of a known reason.

@michaelficarra
Copy link
Collaborator

I'll reopen, but I don't think this is a problem we should worry about. In a single non-release version of an interpreter, there's a bug that was fixed in the next revision. We don't need to worry about working around those.

@michaelficarra michaelficarra reopened this Jan 7, 2012
@geraldalewis
Copy link
Contributor

#2021 will fix this issue:

bin/coffee -bpe 'method.static'
method["static"];

@michaelficarra
Copy link
Collaborator

fixed by #2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants