Bug 258715

Summary: Destructuring assignment in for-in loop throws `undefined is not a function`
Product: WebKit Reporter: YuHao Hu <yuhao.6218>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: keith_miller, mark.lam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description YuHao Hu 2023-06-30 02:08:12 PDT
git commit id: 8cdb27dae2a958f4ad5ff00f4900a7c235835247

```
for (const a in ",,,,,,,,,,,") {
    [,,,] = a;
}
```

run args:
```
WebKitBuild/Debug/bin/jsc --useConcurrentJIT=0 --jitPolicyScale=0.001 --useFTLJIT=0 test.js
```

program output:
```
Exception: TypeError: undefined is not a function (near '...[,,,]...')
global code@test.js:2:5
```

Expected behavior should not output anything.
Comment 1 Radar WebKit Bug Importer 2023-07-07 02:09:15 PDT
<rdar://problem/111897193>