<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] incorrectly reports SyntaxError when destructuring `let`"
   href="https://bugs.webkit.org/show_bug.cgi?id=157974">157974</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[JSC] incorrectly reports SyntaxError when destructuring `let`
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>caitp&#64;igalia.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Right now, the parser eagerly reports an error when parsing an ObjectPattern (with DestructuringKind::DestructureToLet), as soon as it encounters the identifier &quot;let&quot; is encountered, without knowing if &quot;let&quot; is the intended destructuring target / binding identifier or not.

Example code:

```
let {let: a} = {let: 1 }
```

This should declare a lexical variable `a` initialized to `1`, but instead reports a SyntaxError. It's just a case of reporting the error a bit too early, before it's known whether it's the binding target or not. Easy fix, good first bug :)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>