[Webkit-unassigned] [Bug 147064] New: ES6 Classes: Cannot override getter / setter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 17 20:12:43 PDT 2015


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

            Bug ID: 147064
           Summary: ES6 Classes: Cannot override getter / setter
    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: joepeck at webkit.org
                CC: drousso at apple.com, ggaren at apple.com, rniwa at webkit.org,
                    utatane.tea at gmail.com,
                    webkit-bug-importer at group.apple.com

* SUMMARY
Cannot override getter / setter.

* TEST
<script>
"use strict";
var Base = class Base {
    constructor() { this._name = "Name"; }
    get name() { return this._name; } // If this instead returns a static: return "Foo" things somewhat work.
    set name(x) { this._name = x; }
};

var Subclass = class Subclass extends Base {
    get name() { return super.name; }
};

var instance = new Subclass;
console.log(instance.name); // undefined, but expected "Name"
</script>

-- 
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/20150718/b1dfb4ad/attachment.html>


More information about the webkit-unassigned mailing list