Assignment of global variables deleted by their RHS in strict mode

Kevin Gibbons kevin at
Wed Aug 26 21:55:21 UTC 2015

See the following test262 test:
(and related tests with update / compound assignment).

In short, it is possible to have a Reference to a global variable which has
been deleted. Normally, bare assignments to undeclared variables in strict
mode cause ReferenceErrors. However, calling PutValue on a reference to a
global variable which has been deleted since the reference was created does
not throw a ReferenceError in strict mode, even though, *at the time of
writing*, that variable does not exist.

As far as I can tell, this is true in ES5 as well as ES6, but none of {V8,
SpiderMonkey, JavaScriptCore, Nashorn} get it right. This is consistent and
makes sense, but is it intentional?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list