Skip to content

Commit

Permalink
Update test for deletion of SuperProperty
Browse files Browse the repository at this point in the history
The following proposed change modifies the semantics this test was
originally written to verify:

Normative: Allow null or undefined in Reference Records
tc39/ecma262#2267
  • Loading branch information
jugglinmike committed Jul 19, 2021
1 parent 991a389 commit 65780e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/language/expressions/delete/super-property-null-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-delete-operator-runtime-semantics-evaluation
description: The restriction on the base of a super property must be enforced before the delete expression is evaluated.
description: The restriction on the base of a super property must not be enforced before the delete expression is evaluated.
info: |
# 13.3.7.3 MakeSuperPropertyReference ( actualThis, propertyKey, strict )
Expand All @@ -15,9 +15,11 @@ info: |
UnaryExpression : delete UnaryExpression
1. Let ref be the result of evaluating UnaryExpression.
2. ReturnIfAbrupt(ref).
[...]
5. If IsPropertyReference(ref) is true, then
a. If IsSuperReference(ref) is true, throw a ReferenceError exception.
a. Assert: ! IsPrivateReference(ref) is false.
b. If IsSuperReference(ref) is true, throw a ReferenceError exception.
features: [class]
---*/

Expand All @@ -29,6 +31,6 @@ class C {

Object.setPrototypeOf(C, null);

assert.throws(TypeError, () => {
assert.throws(ReferenceError, () => {
C.m();
});

0 comments on commit 65780e5

Please sign in to comment.