[Webkit-unassigned] [Bug 258715] New: Destructuring assignment in for-in loop throws `undefined is not a function`

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 30 02:08:12 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=258715

            Bug ID: 258715
           Summary: Destructuring assignment  in for-in loop throws
                    `undefined is not a function`
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: yuhao.6218 at gmail.com

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 at test.js:2:5
```

Expected behavior should not output anything.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230630/74257c3e/attachment.htm>


More information about the webkit-unassigned mailing list