You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to me that SAFE does not conform to ES5.1, Section 8.7.2 PutValue (V, W), [[Put]], Step 2.a.
For the following test program:
// 8.7.2 PutValue (V, W), [[Put]], Step 2.a
// 2. If the result of calling the [[CanPut]] internal method of O with argument P is false, then
// a. If Throw is true, then throw a TypeError exception.
// b. ...
// For [[Put]] for a reference with a primitive base,
// if [[CanPut]] returns false, and Throw is true, then it throws TypeError.
// NOTE: In this example, [[CanPut]] returns false, because 'writable' is false.
"use strict";
Object.defineProperty(Number.prototype, "x", { "value" : 0, "writable" : false, "enumerable" : true, "configurable" : true });
1["x"] = 10; // TypeError
SAFE failed to throw a TypeError exception:
$ ./bin/jsaf interpret 02.js
Normal(10)
Is there anything that I'm missing?
The text was updated successfully, but these errors were encountered:
Thank you for the report. Currently, SAFE focuses on static analysis of JavaScript programs rather than interpretation of them. While the SAFE interpreter does not support the strict mode at the moment, the SAFE bug detector using static analysis results supports it.
It seems to me that SAFE does not conform to ES5.1, Section 8.7.2 PutValue (V, W), [[Put]], Step 2.a.
For the following test program:
SAFE failed to throw a TypeError exception:
Is there anything that I'm missing?
The text was updated successfully, but these errors were encountered: