<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>148098</bug_id>
          
          <creation_ts>2015-08-17 15:08:16 -0700</creation_ts>
          <short_desc>We need a better error message for the use let/const/class in a Statement and not a StatementListItem</short_desc>
          <delta_ts>2017-06-03 04:55:33 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>168684</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saam Barati">saam</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>basile_clement</cc>
    
    <cc>bburg</cc>
    
    <cc>benjamin</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>littledan</cc>
    
    <cc>mark.lam</cc>
    
    <cc>mmirman</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
    
    <cc>ticaiolima</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1118259</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2015-08-17 15:08:16 -0700</bug_when>
    <thetext>i.e,
if (c)
   let/const/class F;

while (c)
   let/const/class F;

should have a better syntax error message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1278162</commentid>
    <comment_count>1</comment_count>
    <who name="Daniel Ehrenberg">littledan</who>
    <bug_when>2017-02-17 00:44:37 -0800</bug_when>
    <thetext>Whenever you&apos;re editing this code, there&apos;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 &apos;:&apos;. Parse error.

whereas in V8, ChakraCore and SpiderMonkey, let is permitted as a label.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1279600</commentid>
    <comment_count>2</comment_count>
    <who name="Caio Lima">ticaiolima</who>
    <bug_when>2017-02-21 15:52:19 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Whenever you&apos;re editing this code, there&apos;s a case in this area that I
&gt; believe should be allowed, but seems to throw a syntax error:
&gt; 
&gt; ```
&gt; if (true) let: x()
&gt; ```
&gt; 
&gt; or
&gt; 
&gt; ```
&gt; with ({}) let: y()
&gt; ```
&gt; 
&gt; When I run that in JSC, I get
&gt; 
&gt; SyntaxError: Unexpected token &apos;:&apos;. Parse error.
&gt; 
&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1315400</commentid>
    <comment_count>3</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2017-06-03 04:55:33 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 168684 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>