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

Function-level 'use strict' is not bug-compatible #351

Closed
gbrail opened this issue Oct 26, 2017 · 2 comments
Closed

Function-level 'use strict' is not bug-compatible #351

gbrail opened this issue Oct 26, 2017 · 2 comments

Comments

@gbrail
Copy link
Collaborator

gbrail commented Oct 26, 2017

Some existing code that worked on previous versions of Rhino fails in 1.7.7.2. For instance:

function foo() {
'use strict';
bar = 1234;
}

This would work previously because Rhino used to ignore "use strict" inside a function.

We should change this enhancement to work only when we have the language level set to "ES6" or above.

@gbrail
Copy link
Collaborator Author

gbrail commented Nov 11, 2017

Addressed in #361.

@gbrail
Copy link
Collaborator Author

gbrail commented Nov 14, 2017

This feature now only works if the language level is set to "ES6" or higher.

@gbrail gbrail closed this as completed Nov 14, 2017
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

No branches or pull requests

1 participant