Bug 258715 - Destructuring assignment in for-in loop throws `undefined is not a function`
Summary: Destructuring assignment in for-in loop throws `undefined is not a function`
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-30 02:08 PDT by YuHao Hu
Modified: 2023-07-07 02:09 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>