>
>
>>     x => { "use strict"; with (x) {} } // Not a strict-mode error
>>
>
> Spec bug if so -- that should make the arrow function so stated have
> strict code.
>
>
That would probably be the expectation, and I'm possibly just missing
something in the spec.  It does add an extra degree of complexity, though.
 Consider this edge case:

    (x = function z(x) { delete x }) => { "use strict" }

When we parse the invalid unary expression in function 'z', we don't even
know that we're in a "maybe strict" context yet.  It's only after we see
the "=>" that we know.  It's still doable without an AST walk though, I
think.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to