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

Support ES2015 block-level function declarations in strict-mode #970

Open
p-bakker opened this issue Jun 29, 2021 · 0 comments
Open

Support ES2015 block-level function declarations in strict-mode #970

p-bakker opened this issue Jun 29, 2021 · 0 comments
Labels
behavior block-scope Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec Strict Mode Issues related to non-compliance with the ES5 Strict Mode spec
Milestone

Comments

@p-bakker
Copy link
Collaborator

p-bakker commented Jun 29, 2021

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block#block_scoping_rules_with_let_const_or_function_declaration_in_strict_mode

In ES5 function declarations were not allowed in strict mode in the newly introduced block scopes
As of ES2015 function declarations inside block scopes in strict mode are allowed, but they are to be block scopes

Note that our let implementation already adheres to block scoping (while our const impl. does not, see #939)

@p-bakker p-bakker added the Strict Mode Issues related to non-compliance with the ES5 Strict Mode spec label Jun 29, 2021
@p-bakker p-bakker added this to the ES2015 milestone Jun 29, 2021
@p-bakker p-bakker added the Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior block-scope Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec Strict Mode Issues related to non-compliance with the ES5 Strict Mode spec
Projects
None yet
Development

No branches or pull requests

1 participant