The follow test case has been used: /** * Assignment to an undeclared identifier or otherwise unresolvable reference does not create a * property in the global object. When a simple assignment occurs within strict mode code, its * LeftHandSide must not evaluate to an unresolvable Reference. If it does a ReferenceError * exception is thrown (8.7.2). The LeftHandSide also may not be a reference to a data property * with the attribute value {[[Writable]]:false}, to an accessor property with the attribute value * {[[Set]]:undefined}, nor to a non-existent property of an object whose [[Extensible]] internal * property has the value false. In these cases a TypeError exception is thrown (11.13.1). */ var testDesc = 'Assignment to property with [[Writable]] false must produce a TypeError: '; try { eval('"use strict"; (function(){}).length = 20;'); util.printLine(testDesc + 'FALSE'); } catch (e) { if (e instanceof TypeError) { util.printLine(testDesc + 'TRUE'); } else { util.printLine(testDesc + 'UNDEFINED BEHAVIOR'); } }
This a problem specific to function.length and other similar properties that use magic logic to determine their actual value.
Function/Array/Arguments/String/RegExp all look like they should work correctly. If there are any custom read-only properties I've missed that don't throw, please reopen. cheers, G.