archives

« Bugzilla Issues Index

#3301 — Globals not treated as var bindings


The VarNames list of the global env is currently created empty. It should initially contain all global names defined in Sec. 18, so that code like the following is not allowed.

<>
function f(x) { return x === undefined }
</>

<>
let undefined = 666
</>


At the Nov. TC39 meeting we decide to forbind global lexical declarations that would shadow non-configurable own properties of the global object. This takes care of bui;t-ins like undefined and infinity.

Apply this to Ch 18 names would be future hostile as it essentially means that any future addition to the chapter 18 names would be a breaking change.

fixed in rev29 editor's draft


fixed in rev29