Can strict parameters shadow strict function names?

Michael Saboff msaboff at apple.com
Thu Jun 9 20:18:08 UTC 2016


I filed <https://bugs.webkit.org/show_bug.cgi?id=158575 <https://bugs.webkit.org/show_bug.cgi?id=158575>> “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 <allen at wirfs-brock.com> wrote:
> 
> 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 it). Adding such a restriction in ES2015 (or now) would have been a breaking change.
> 
> Allen
> 
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160609/1978d369/attachment-0001.html>


More information about the es-discuss mailing list