On Feb 2, 2012, at 2:07 AM, Claus Reinke wrote:
> 
>>> and embed the assignment in an eval:
>>> 
>>>> function f(a) {
>>>>   eval("arguments[0]=2");
>>>>   return a
>>>> }
>>>> print(f(1));  // 2 or 1?
>> 
>> same as above, same as ES5
> 
> But if I put this in a module, f will be in extended strict mode, while
> the eval code will default to non-extended non-strict mode, right?
> Which wouldn't quite be the same as in the version without eval.

Per ES5 10.1.1, the code will be strict code--direct eval from strict code 
always processes the eval coce as strict code.

Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to