Skip to content

Commit

Permalink
ref. #1074 Fixed error with yeild in ComputedPropertyName
Browse files Browse the repository at this point in the history
  • Loading branch information
tuchida authored and gbrail committed Aug 9, 2024
1 parent 2493233 commit 4a1e870
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 16 additions & 0 deletions rhino/src/main/java/org/mozilla/javascript/NodeTransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,22 @@ private void transformCompilationUnit_r(
}
break;
}

case Token.OBJECTLIT:
{
Object[] propertyIds = (Object[]) node.getProp(Node.OBJECT_IDS_PROP);
if (propertyIds != null) {
for (Object propertyId : propertyIds) {
if (!(propertyId instanceof Node)) continue;
transformCompilationUnit_r(
tree,
(Node) propertyId,
node instanceof Scope ? (Scope) node : scope,
createScopeObjects,
inStrictMode);
}
}
}
}

transformCompilationUnit_r(
Expand Down
4 changes: 1 addition & 3 deletions tests/testsrc/test262.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5437,7 +5437,7 @@ language/expressions/new 41/59 (69.49%)

~language/expressions/new.target

language/expressions/object 869/1169 (74.34%)
language/expressions/object 867/1169 (74.17%)
dstr/async-gen-meth-ary-init-iter-close.js {unsupported: [async-iteration, async]}
dstr/async-gen-meth-ary-init-iter-get-err.js {unsupported: [async-iteration]}
dstr/async-gen-meth-ary-init-iter-get-err-array-prototype.js {unsupported: [async-iteration]}
Expand Down Expand Up @@ -6116,7 +6116,6 @@ language/expressions/object 869/1169 (74.34%)
method-definition/async-returns-async-function-returns-newtarget.js {unsupported: [async-functions, async]}
method-definition/async-super-call-body.js {unsupported: [async]}
method-definition/async-super-call-param.js {unsupported: [async]}
method-definition/computed-property-name-yield-expression.js non-interpreted
method-definition/early-errors-object-method-arguments-in-formal-parameters.js {unsupported: [async-functions]}
method-definition/early-errors-object-method-await-in-formals.js {unsupported: [async-functions]}
method-definition/early-errors-object-method-await-in-formals-default.js {unsupported: [async-functions]}
Expand Down Expand Up @@ -6234,7 +6233,6 @@ language/expressions/object 869/1169 (74.34%)
__proto__-permitted-dup.js {unsupported: [async-iteration, async-functions]}
__proto__-permitted-dup-shorthand.js
accessor-name-computed-in.js
accessor-name-computed-yield-expr.js non-interpreted
accessor-name-computed-yield-id.js non-strict
accessor-name-literal-numeric-binary.js {strict: [-1], non-strict: [-1]}
accessor-name-literal-numeric-exponent.js {strict: [-1], non-strict: [-1]}
Expand Down

0 comments on commit 4a1e870

Please sign in to comment.