In ES6 strict mode: do function declarations within a block hoist?

2014-06-05 Thread John Lenz
That is to say, is this valid: if (x) { f(); function f() { doSomething() } } The same question applies to class declarations. I assume that top level class declarations hoist. (Where is this in the spec?) ___ es-discuss mailing list

Re: In ES6 strict mode: do function declarations within a block hoist?

2014-06-05 Thread Andreas Rossberg
On 5 June 2014 17:44, John Lenz concavel...@gmail.com wrote: That is to say, is this valid: if (x) { f(); function f() { doSomething() } } The same question applies to class declarations. I assume that top level class declarations hoist. (Where is this in the spec?) Yes, that is

Re: In ES6 strict mode: do function declarations within a block hoist?

2014-06-05 Thread John Lenz
Thanks. On Thu, Jun 5, 2014 at 8:54 AM, Andreas Rossberg rossb...@google.com wrote: On 5 June 2014 17:44, John Lenz concavel...@gmail.com wrote: That is to say, is this valid: if (x) { f(); function f() { doSomething() } } The same question applies to class declarations. I

Strict Mode and Function

2010-06-02 Thread Dmitry A. Soshnikov
define such a strict mode function using the Function constructor/ (15.3.2) will throw a /SyntaxError/ exception. I've posted a bug to the BESEN's author -- http://bit.ly/bmkN1p But he referenced to the conformance test suite -- http://es5conform.codeplex.com/ and in particular for these test

RE: Strict Mode and Function

2010-06-02 Thread Allen Wirfs-Brock
From: Dmitry A. Soshnikov But he referenced to the conformance test suite -- http://es5conform.codeplex.com/ and in particular for these test cases -- http://vserver.rosseaux.net/stuff/tests/ where is said that arguments and eval are allowed in such cases:

Re: Strict Mode and Function

2010-06-02 Thread Dmitry A. Soshnikov
On 02.06.2010 22:22, Allen Wirfs-Brock wrote: From: Dmitry A. Soshnikov But he referenced to the conformance test suite -- http://es5conform.codeplex.com/ and in particular for these test cases -- http://vserver.rosseaux.net/stuff/tests/ where is said that arguments and eval are allowed in