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

Caio Lima
Reported 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.
Attachments
Patch (3.34 KB, patch)
2021-01-12 12:32 PST, Caio Lima
no flags
Caio Lima
Comment 1 2021-01-12 12:32:23 PST
Caio Lima
Comment 2 2021-01-12 16:02:43 PST
Comment on attachment 417480 [details] Patch Thanks for the quick review!
EWS
Comment 3 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].
Radar WebKit Bug Importer
Comment 4 2021-01-12 16:08:18 PST
Note You need to log in before you can comment on or make changes to this bug.