| Summary: | [ESNext] super accesses broken on arrow functions defined as class field | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Caio Lima <ticaiolima> | ||||
| Component: | JavaScriptCore | Assignee: | 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: |
|
||||||
Created attachment 417480 [details]
Patch
Comment on attachment 417480 [details]
Patch
Thanks for the quick review!
Committed r271420: <https://trac.webkit.org/changeset/271420> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417480 [details]. |
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.