« Bugzilla Issues Index

#1441 — Non-strict "delete obj.p" should return false if obj.p isn't configurable

In 11.4.1 "The delete Operator",
under "Runtime Semantics: Evaluation",
step 5.b-e are like this:

> b. Let deleteStatus be the result of calling the [[Delete]] internal method
> on ToObject(GetBase(ref)), providing GetReferencedName(ref) as the argument.
> c. ReturnIfAbrupt(deleteStatus).
> d. If deleteStatus is false and IsStrictReference(ref) is true, then
> throw a TypeError exception.
> e. Return true.

I think the last step should be "Return deleteStatus." so that deleting a nonconfigurable property in non-strict code returns false:

js> var obj = Object.create({}, {p: {value: 3}});
js> delete obj.p;

fixed in rev 15 editor's draft

resolved in rev 15, May 14, 2013 draft