From 44d03a823d826c03a6f96184ac507f4487c11070 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 22 Sep 2025 14:48:43 +0200 Subject: [PATCH] fixed parsing of computed property name --- TODO | 2 +- quickjs.c | 2 +- test262_errors.txt | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 7f88621..76d5c31 100644 --- a/TODO +++ b/TODO @@ -62,5 +62,5 @@ Optimization ideas: Test262o: 0/11262 errors, 463 excluded Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch) -Result: 54/80760 errors, 1631 excluded, 6064 skipped +Result: 53/80840 errors, 1631 excluded, 6024 skipped Test262 commit: e7e136756cd67c1ffcf7c09d03aeb8ad5a6cec0c diff --git a/quickjs.c b/quickjs.c index 498dcbf..fe67301 100644 --- a/quickjs.c +++ b/quickjs.c @@ -23437,7 +23437,7 @@ static int __exception js_parse_property_name(JSParseState *s, } else if (s->token.val == '[') { if (next_token(s)) goto fail; - if (js_parse_expr(s)) + if (js_parse_assign_expr(s)) goto fail; if (js_parse_expect(s, ']')) goto fail; diff --git a/test262_errors.txt b/test262_errors.txt index ffe19b9..b669a6b 100644 --- a/test262_errors.txt +++ b/test262_errors.txt @@ -33,7 +33,6 @@ test262/test/staging/sm/async-functions/async-contains-unicode-escape.js:45: Err test262/test/staging/sm/async-functions/await-error.js:12: Test262Error: Expected SameValue(«false», «true») to be true test262/test/staging/sm/async-functions/await-in-arrow-parameters.js:33: Error: Assertion failed: expected exception SyntaxError, no exception thrown - AsyncFunction:(a = (b = await/r/g) => {}) => {} test262/test/staging/sm/class/boundFunctionSubclassing.js:12: Test262Error: Expected SameValue(«false», «true») to be true -test262/test/staging/sm/class/compPropNames.js:26: Error: Expected syntax error: ({[1, 2]: 3}) test262/test/staging/sm/class/strictExecution.js:32: Error: Assertion failed: expected exception TypeError, no exception thrown test262/test/staging/sm/class/superPropOrdering.js:83: Error: Assertion failed: expected exception TypeError, no exception thrown test262/test/staging/sm/expressions/short-circuit-compound-assignment-const.js:97: TypeError: 'a' is read-only