Bug 247436
| Summary: | `in` operator inside for statement destructuring | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kanguk Lee <p51lee> |
| Component: | JavaScriptCore | Assignee: | Yijia Huang <yijia_huang> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Kanguk Lee
// input.js
for ( var { x = 0 in [ 0 ] } of [ 0 ] );
_____________________
Hello,
Executing the input.js using JSC throws SyntaxError, but it is expected to terminate normally.
Running the input.js with JSC gives
---
$ jsc input.js
Exception: SyntaxError: Unexpected keyword 'in'. Expected either a closing '}' or an ',' after a property destructuring pattern.
at input.js:1
---
while other engines behave like
---
# V8
$ node input.js
// no error
# GraalJS
$ js input.js
// no error
---
WebKit version: 615.1.10
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/102065296>
Yijia Huang
Pull request: https://github.com/WebKit/WebKit/pull/6305
EWS
Committed 256497@main (598cda65c4a2): <https://commits.webkit.org/256497@main>
Reviewed commits have been landed. Closing PR #6305 and removing active labels.