WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
220558
[ESNext] super accesses broken on arrow functions defined as class field
https://bugs.webkit.org/show_bug.cgi?id=220558
Summary
[ESNext] super accesses broken on arrow functions defined as class field
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
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Caio Lima
Comment 1
2021-01-12 12:32:23 PST
Created
attachment 417480
[details]
Patch
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
<
rdar://problem/73085036
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug