<?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>193057</bug_id>
          
          <creation_ts>2018-12-29 10:47:45 -0800</creation_ts>
          <short_desc>Extending a bound function of a non-costructor should throw a TypeError</short_desc>
          <delta_ts>2020-05-11 14:31:09 -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>Safari 12</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>144093</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>ljharb</cc>
    
    <cc>ross.kirsling</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1491003</commentid>
    <comment_count>0</comment_count>
    <who name="">webkit</who>
    <bug_when>2018-12-29 10:47:45 -0800</bug_when>
    <thetext>Attempting to extend a bound function whose underlying function is not a constructor (like an arrow function, a generator, etc.) should result in a TypeError as per the specification (https://www.ecma-international.org/ecma-262/9.0/index.html#sec-runtime-semantics-classdefinitionevaluation).

// Test case

const A = (_=&gt;_).bind();
A.prototype = null;
class B extends A {}

// Expected behavior: TypeError should be thrown
// Actual behavior: No error is thrown</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1641527</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2020-04-14 13:47:42 -0700</bug_when>
    <thetext>Looking through our failure list, this doesn&apos;t appear to have a test262 test.

Would you be interested in adding one there?
https://github.com/tc39/test262</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1651455</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-05-11 14:31:09 -0700</bug_when>
    <thetext>(In reply to Ross Kirsling from comment #1)
&gt; Looking through our failure list, this doesn&apos;t appear to have a test262 test.

JSC doesn&apos;t perform IsConstructor during ClassDefinitionEvaluation, failing https://test262.report/browse/language/statements/class/subclass/class-definition-superclass-generator.js. https://webkit.org/b/144093 should fix it.

I am adding a few more tests with bound/proxied arrow/async functions in https://github.com/tc39/test262/pull/2619.

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

    </bug>

</bugzilla>