<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>220517</bug_id>
          
          <creation_ts>2021-01-11 11:26:25 -0800</creation_ts>
          <short_desc>SyntaxError Duplicate parameter in function with destructuring with assignment</short_desc>
          <delta_ts>2023-10-12 15:09:54 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 10.15</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>247433</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris">ychris2010-1</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>edward</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1718748</commentid>
    <comment_count>0</comment_count>
    <who name="Chris">ychris2010-1</who>
    <bug_when>2021-01-11 11:26:25 -0800</bug_when>
    <thetext>Webkit throws a SyntaxError with message &quot;Duplicate parameter &lt;name&gt; not allowed in function with destructuring parameters.&quot; when attempting to assign a function to another variable. This does not occur if the function is declared separately from the assignment.

Works:

function a({ test: a }) { console.log(a); }
let b = a;

Throws SyntaxError:

let b = function a({ test: a }) { console.log(a); };


Reproduced with Webkit build 271364</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1720371</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-01-18 11:27:12 -0800</bug_when>
    <thetext>&lt;rdar://problem/73327300&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984737</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2023-10-12 15:09:54 -0700</bug_when>
    <thetext>This was fixed in https://commits.webkit.org/256478@main

*** This bug has been marked as a duplicate of bug 247433 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>