Status: New
Owner: ----

New issue 3704 by [email protected]: Updating an immutable binding does not throw a TypeError exception in a strict mode
https://code.google.com/p/v8/issues/detail?id=3704

In a strict mode, it should throw a TypeError exception, when attempting to update an immutable binding, but v8 does not.

According to ES5, Section 10.2.1.1.3 SetMutableBinding (N,V,S), Step 4,
http://es5.github.io/#x10.2.1.1.3

the following code is supposed to throw a TypeError exception, since "g" is an immutable binding inside the function body (according to ES5, Section 13 Function Definition, Step 3 of the third block).

"use strict";
var f = function g() {
  g = 0;
};
f(); // TypeError

However, v8 does not report any exception, while SpiderMonkey correctly throws a TypeError exception.

I've tested this using the JavaScript console of Chrome 38.0.2125.122.

Thanks,
Daejun

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to