Bug 220558

Summary: [ESNext] super accesses broken on arrow functions defined as class field
Product: WebKit Reporter: Caio Lima <ticaiolima>
Component: JavaScriptCoreAssignee: Caio Lima <ticaiolima>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Caio Lima 2021-01-12 12:28:29 PST
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.
Comment 1 Caio Lima 2021-01-12 12:32:23 PST
Created attachment 417480 [details]
Patch
Comment 2 Caio Lima 2021-01-12 16:02:43 PST
Comment on attachment 417480 [details]
Patch

Thanks for the quick review!
Comment 3 EWS 2021-01-12 16:06:00 PST
Committed r271420: <https://trac.webkit.org/changeset/271420>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417480 [details].
Comment 4 Radar WebKit Bug Importer 2021-01-12 16:08:18 PST
<rdar://problem/73085036>