<?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>157461</bug_id>
          
          <creation_ts>2016-05-08 02:05:35 -0700</creation_ts>
          <short_desc>ES6: Classes: Should be allowed to assign values to static method with name &quot;arguments&quot; and &quot;caller&quot;</short_desc>
          <delta_ts>2021-05-14 04:51:58 -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>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>163579</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>152985</dependson>
          <blocked>140491</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="GSkachkov">gskachkov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1191041</commentid>
    <comment_count>0</comment_count>
    <who name="GSkachkov">gskachkov</who>
    <bug_when>2016-05-08 02:05:35 -0700</bug_when>
    <thetext>class C { 
    static caller() { return &apos;abc&apos;; } 
}

C.caller(); // abc
C.caller = function () { return &apos;cba&apos;; };
C.caller(); // cab

C.arguments = function () {} ??? // In Chrome &amp;&amp; Firefox - TypeError</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1760054</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2021-05-14 04:51:58 -0700</bug_when>
    <thetext>(In reply to GSkachkov from comment #0)
&gt; class C { 
&gt;     static caller() { return &apos;abc&apos;; } 
&gt; }

r225845 fixed JSFunction::put() and JSFunction::defineOwnProperty() to perform ordinary [[Set]] / [[DefineOwnProperty]] for classes and strict functions.
I am adding this test case as part of https://bugs.webkit.org/show_bug.cgi?id=225277.

&gt; C.arguments = function () {} ??? // In Chrome &amp;&amp; Firefox - TypeError

This throws TypeError because of https://tc39.es/ecma262/#sec-addrestrictedfunctionproperties.

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

    </bug>

</bugzilla>