<?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>153977</bug_id>
          
          <creation_ts>2016-02-07 23:52:48 -0800</creation_ts>
          <short_desc>[ES6] Arrow function syntax. Using eval with &apos;super&apos;/&apos;super()&apos; in arrow function within the class should not lead to Syntax error</short_desc>
          <delta_ts>2016-04-04 13:43: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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>150893</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>150893</dependson>
          <blocked>140855</blocked>
    
    <blocked>154027</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="GSkachkov">gskachkov</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>saam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1162839</commentid>
    <comment_count>0</comment_count>
    <who name="GSkachkov">gskachkov</who>
    <bug_when>2016-02-07 23:52:48 -0800</bug_when>
    <thetext>Using eval with &apos;super&apos;/&apos;super()&apos; in arrow function within the class should not lead to Syntax error:

const testValue  = &apos;test-value&apos;;

class A {
    constructor() {
        this.idValue = testValue;
    }
};

class B extends A {
  constructor (beforeSuper) {
      var arrow = () =&gt; eval(&apos;(() =&gt; super())()&apos;);
      arrow();
  }
};

let b = new B();
b.idValue == testValue; //true</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1169039</commentid>
    <comment_count>1</comment_count>
    <who name="GSkachkov">gskachkov</who>
    <bug_when>2016-02-28 14:44:06 -0800</bug_when>
    <thetext>There is 15.1 https://tc39.github.io/ecma262/#sec-scripts-static-semantics-early-errors that stats:
ScriptBody:StatementList
#It is a Syntax Error if StatementList Contains super unless the source code containing super is eval code that is being processed by a direct eval that is contained in function code that is not the function code of an ArrowFunction.
#It is a Syntax Error if StatementList Contains NewTarget unless the source code containing NewTarget is eval code that is being processed by a direct eval that is contained in function code that is not the function code of an ArrowFunction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1180476</commentid>
    <comment_count>2</comment_count>
    <who name="GSkachkov">gskachkov</who>
    <bug_when>2016-04-04 13:43:54 -0700</bug_when>
    <thetext>Already implemented in https://bugs.webkit.org/show_bug.cgi?id=150893

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

    </bug>

</bugzilla>