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

Assigning to Undeclared Global Variable Must Throw Reference Error #2979

Open
veera-sivarajan opened this issue May 30, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working execution Issues or PRs related to code execution

Comments

@veera-sivarajan
Copy link
Contributor

Describe the bug
In strict mode code, assigning to an undeclared global variable must throw a ReferenceError but Boa's runtime evaluates it without any errors.

This bug causes assign-to-global-undefined.js in test262 to fail.

To Reproduce

"use strict";

undeclared = (this.undeclared = 5);

Expected behavior
This should throw a reference error. Instead, 5 is assigned to undeclared and no error is thrown.

Additional context
I'd like to try and find a fix for this. Can you please assign it to me? Thanks!

@veera-sivarajan veera-sivarajan added the bug Something isn't working label May 30, 2023
@jedel1043 jedel1043 added the execution Issues or PRs related to code execution label May 30, 2023
@jedel1043
Copy link
Member

@veera-sivarajan Assigned!

@jedel1043 jedel1043 moved this to In Progress in Boa pre-v1 May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution
Projects
Status: In Progress
Development

No branches or pull requests

2 participants