Skip to content

Assigning to Undeclared Global Variable Must Throw Reference Error #2979

@veera-sivarajan

Description

@veera-sivarajan

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!

Metadata

Metadata

Labels

bugSomething isn't workingexecutionIssues or PRs related to code execution

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions