[Webkit-unassigned] [Bug 220558] New: [ESNext] super accesses broken on arrow functions defined as class field

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 12 12:28:29 PST 2021


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

            Bug ID: 220558
           Summary: [ESNext] super accesses broken on arrow functions
                    defined as class field
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ticaiolima at gmail.com

The following program is throwing TypeError, but it should run sucessfully:

```
class C {
    func = () => {
        super.prop = "foo";
        return this.prop;
    };
}

let c = new C;
assert(c.func(), "foo");

```

The result we are getting is: `TypeError: undefined is not an object (evaluating 'super.prop = "foo"')`. We are missing proper `super` binding there.

-- 
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/20210112/1f9a6a1d/attachment.htm>


More information about the webkit-unassigned mailing list