From e182050771b5971643be4e2391e2ba6f05eb1665 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Sat, 9 Dec 2023 12:31:33 +0100 Subject: [PATCH] fixed delete super.x error --- quickjs.c | 2 ++ test262_errors.txt | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quickjs.c b/quickjs.c index 31f62aa..0d1cff3 100644 --- a/quickjs.c +++ b/quickjs.c @@ -24646,6 +24646,8 @@ static __exception int js_parse_delete(JSParseState *s) case OP_scope_get_private_field: return js_parse_error(s, "cannot delete a private class field"); case OP_get_super_value: + fd->byte_code.size = fd->last_opcode_pos; + fd->last_opcode_pos = -1; emit_op(s, OP_throw_error); emit_atom(s, JS_ATOM_NULL); emit_u8(s, JS_THROW_ERROR_DELETE_SUPER); diff --git a/test262_errors.txt b/test262_errors.txt index d6d57cf..9822b8a 100644 --- a/test262_errors.txt +++ b/test262_errors.txt @@ -21,8 +21,6 @@ test262/test/language/expressions/assignment/target-member-computed-reference-nu test262/test/language/expressions/assignment/target-member-computed-reference-null.js:32: strict mode: Test262Error: Expected a DummyError but got a TypeError test262/test/language/expressions/assignment/target-member-computed-reference-undefined.js:32: Test262Error: Expected a DummyError but got a TypeError test262/test/language/expressions/assignment/target-member-computed-reference-undefined.js:32: strict mode: Test262Error: Expected a DummyError but got a TypeError -test262/test/language/expressions/delete/super-property-null-base.js:26: Test262Error: Expected a ReferenceError but got a TypeError -test262/test/language/expressions/delete/super-property-null-base.js:26: strict mode: Test262Error: Expected a ReferenceError but got a TypeError test262/test/language/expressions/dynamic-import/usage-from-eval.js:26: TypeError: $DONE() not called test262/test/language/expressions/dynamic-import/usage-from-eval.js:26: strict mode: TypeError: $DONE() not called test262/test/language/expressions/optional-chaining/optional-call-preserves-this.js:21: TypeError: cannot read property 'c' of undefined