Re: Can strict parameters shadow strict function names?

2016-06-09 Thread Michael Saboff
I filed > “ES6: Reusing function name as a parameter name shouldn't throw Syntax Error”. - Michael > On Jun 9, 2016, at 11:28 AM, Allen Wirfs-Brock wrote: > > Yes, they can.

Re: Can strict parameters shadow strict function names?

2016-06-09 Thread Allen Wirfs-Brock
Yes, they can. The JSC behavior is incorrect. The possibility of shadowing function expression names by parameters (or other local declarations) exists as far back as ES3. When strict mode was added in ES5 we didn’t include any restrictions on that shadowing (I don’t recall even considering

Re: Can strict parameters shadow strict function names?

2016-06-09 Thread Andreas Rossberg
On 9 June 2016 at 19:58, Bergi wrote: > Mark S. Miller wrote: > >> var foo = function bar(bar) {'use strict'}; >> >> On all version of Safari/JSC I just tested, this code gives a >> SyntaxError: Invalid parameters or function name in strict mode. >> >> On all versions of

Re: Can strict parameters shadow strict function names?

2016-06-09 Thread Bergi
Mark S. Miller wrote: var foo = function bar(bar) {'use strict'}; On all version of Safari/JSC I just tested, this code gives a SyntaxError: Invalid parameters or function name in strict mode. On all versions of Chrome/v8 and FF/SpiderMonkey I just tested, this code is accepted without error.

Can strict parameters shadow strict function names?

2016-06-09 Thread Mark S. Miller
var foo = function bar(bar) {'use strict'}; On all version of Safari/JSC I just tested, this code gives a SyntaxError: Invalid parameters or function name in strict mode. On all versions of Chrome/v8 and FF/SpiderMonkey I just tested, this code is accepted without error. Which behavior is