From 3b06fd012acaf10fd4a55dc68f3eb7064bd59f59 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Mon, 19 Jul 2021 12:54:52 -0400 Subject: [PATCH] Update test for deletion of SuperProperty The following proposed change modifies the semantics this test was originally written to verify: Normative: Allow null or undefined in Reference Records https://github.com/tc39/ecma262/pull/2267 --- .../expressions/delete/super-property-null-base.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/language/expressions/delete/super-property-null-base.js b/test/language/expressions/delete/super-property-null-base.js index 343f99048e..c1d42ba7ac 100644 --- a/test/language/expressions/delete/super-property-null-base.js +++ b/test/language/expressions/delete/super-property-null-base.js @@ -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 ) @@ -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] ---*/ @@ -29,6 +31,6 @@ class C { Object.setPrototypeOf(C, null); -assert.throws(TypeError, () => { +assert.throws(ReferenceError, () => { C.m(); });