[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


            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


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



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