WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 163579
157461
ES6: Classes: Should be allowed to assign values to static method with name "arguments" and "caller"
https://bugs.webkit.org/show_bug.cgi?id=157461
Summary
ES6: Classes: Should be allowed to assign values to static method with name "...
GSkachkov
Reported
2016-05-08 02:05:35 PDT
class C { static caller() { return 'abc'; } } C.caller(); // abc C.caller = function () { return 'cba'; }; C.caller(); // cab C.arguments = function () {} ??? // In Chrome && Firefox - TypeError
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2021-05-14 04:51:58 PDT
(In reply to GSkachkov from
comment #0
)
> class C { > static caller() { return 'abc'; } > }
r225845
fixed JSFunction::put() and JSFunction::defineOwnProperty() to perform ordinary [[Set]] / [[DefineOwnProperty]] for classes and strict functions. I am adding this test case as part of
https://bugs.webkit.org/show_bug.cgi?id=225277
.
> C.arguments = function () {} ??? // In Chrome && Firefox - TypeError
This throws TypeError because of
https://tc39.es/ecma262/#sec-addrestrictedfunctionproperties
. *** This bug has been marked as a duplicate of
bug 163579
***
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