A bit confused by B.3.2 - Web Legacy Compatibility for Block-Level Function Declarations

John Lenz concavelenz at gmail.com
Mon Jun 2 09:12:13 PDT 2014


It seems to imply that existing "sloppy" code that does this is block scope:

for (let  x = 1; x < 1; x++) {
  function f() {
  }
  store(f);
}

But this is not (as there is a second definition of f):

for (let x = ; x < 10; x++) {
  for (let  y = 1; x < 10; x++) {
     function f() {
    }
    store(f);
  }
  for (let  y = 1; x < 10; x++) {
    function f() {
    }
    store(f);
  }
}

Is this what is intended?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140602/2a3cde53/attachment.html>


More information about the es-discuss mailing list