WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144280
Class name binding should be constant inside the class body
https://bugs.webkit.org/show_bug.cgi?id=144280
Summary
Class name binding should be constant inside the class body
Erik Arvidsson
Reported
2015-04-27 15:01:54 PDT
http://trac.webkit.org/browser/trunk/LayoutTests/js/script-tests/class-syntax-name.js#L84
runTestShouldThrow("class A { constructor() { A = 1; } }; new A"); This should not throw. ClassDeclarations do not create an inner const binding. Your code seems to be doing the right thing based on the -expexted.txt Another line to add to this test would be: runTestShouldThrow("class A { constructor() { A = 1; } }; new A; new A"); which should throw because in the second call to `new A` A is 1.
Attachments
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2015-04-27 15:05:58 PDT
My bad. The test is right and the JSC behavior is wrong. ng.
Ryosuke Niwa
Comment 2
2015-08-04 21:48:22 PDT
Saam, did your patch to make class declaration block-scoped fix this?
Ryosuke Niwa
Comment 3
2015-08-05 21:12:54 PDT
Yup, this has been fixed by
http://trac.webkit.org/changeset/187680
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