[Webkit-unassigned] [Bug 193057] New: Extending a bound function of a non-costructor should throw a TypeError

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 29 10:47:45 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=193057

            Bug ID: 193057
           Summary: Extending a bound function of a non-costructor should
                    throw a TypeError
           Product: WebKit
           Version: Safari 12
          Hardware: Macintosh
                OS: macOS 10.14
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: webkit at fasttime.org

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 = (_=>_).bind();
A.prototype = null;
class B extends A {}

// Expected behavior: TypeError should be thrown
// Actual behavior: No error is thrown

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181229/765d0732/attachment.html>


More information about the webkit-unassigned mailing list