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 168684
148098
We need a better error message for the use let/const/class in a Statement and not a StatementListItem
https://bugs.webkit.org/show_bug.cgi?id=148098
Summary
We need a better error message for the use let/const/class in a Statement and...
Saam Barati
Reported
2015-08-17 15:08:16 PDT
i.e, if (c) let/const/class F; while (c) let/const/class F; should have a better syntax error message.
Attachments
Add attachment
proposed patch, testcase, etc.
Daniel Ehrenberg
Comment 1
2017-02-17 00:44:37 PST
Whenever you're editing this code, there's a case in this area that I believe should be allowed, but seems to throw a syntax error: ``` if (true) let: x() ``` or ``` with ({}) let: y() ``` When I run that in JSC, I get SyntaxError: Unexpected token ':'. Parse error. whereas in V8, ChakraCore and SpiderMonkey, let is permitted as a label.
Caio Lima
Comment 2
2017-02-21 15:52:19 PST
(In reply to
comment #1
)
> Whenever you're editing this code, there's a case in this area that I > believe should be allowed, but seems to throw a syntax error: > > ``` > if (true) let: x() > ``` > > or > > ``` > with ({}) let: y() > ``` > > When I run that in JSC, I get > > SyntaxError: Unexpected token ':'. Parse error. > > whereas in V8, ChakraCore and SpiderMonkey, let is permitted as a label.
Daniel, we are solving this bug in
https://bugs.webkit.org/show_bug.cgi?id=168684
Thank you for your report.
Yusuke Suzuki
Comment 3
2017-06-03 04:55:33 PDT
*** This bug has been marked as a duplicate of
bug 168684
***
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