[Webkit-unassigned] [Bug 144283] New: ES6 classes: super() should throw when extending null

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 27 15:26:20 PDT 2015


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

            Bug ID: 144283
           Summary: ES6 classes: super() should throw when extending null
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: arv at chromium.org

http://trac.webkit.org/browser/trunk/LayoutTests/js/script-tests/class-syntax-super.js#L59

shouldThrow('new (class extends null { constructor() { super(); return undefined } })', '"TypeError: undefined is not an object (evaluating \'super()\')"');


and

http://trac.webkit.org/browser/trunk/LayoutTests/js/script-tests/class-syntax-super.js#L64

shouldThrow('new (class extends null { constructor() { super() } })', '"TypeError: undefined is not an object (evaluating \'super()\')"');


The reason super() throws is because Function.prototype is not constructable. Your test seems to be testing the return value. It should never get there.

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


More information about the webkit-unassigned mailing list