<?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>144280</bug_id>
          
          <creation_ts>2015-04-27 15:01:54 -0700</creation_ts>
          <short_desc>Class name binding should be constant inside the class body</short_desc>
          <delta_ts>2015-08-05 21:12: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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>140491</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">arv</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>joepeck</cc>
    
    <cc>rniwa</cc>
    
    <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1089213</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2015-04-27 15:01:54 -0700</bug_when>
    <thetext>http://trac.webkit.org/browser/trunk/LayoutTests/js/script-tests/class-syntax-name.js#L84

  runTestShouldThrow(&quot;class A { constructor() { A = 1; } }; new A&quot;);

This should not throw. ClassDeclarations do not create an inner const binding. Your code seems to be doing the right thing based on the -expexted.txt

Another line to add to this test would be:

  runTestShouldThrow(&quot;class A { constructor() { A = 1; } }; new A; new A&quot;);

which should throw because in the second call to `new A` A is 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089216</commentid>
    <comment_count>1</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2015-04-27 15:05:58 -0700</bug_when>
    <thetext>My bad. The test is right and the JSC behavior is wrong.
ng.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1114966</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2015-08-04 21:48:22 -0700</bug_when>
    <thetext>Saam, did your patch to make class declaration block-scoped fix this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1115267</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2015-08-05 21:12:54 -0700</bug_when>
    <thetext>Yup, this has been fixed by http://trac.webkit.org/changeset/187680</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>