Can strict parameters shadow strict function names?
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”.
> 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.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss