New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 701548 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue v8:6098
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Invalid destructuring assignment: SyntaxError when it's not

Reported by m...@boopathi.in, Mar 14 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
The following is not a syntax Error
0 < foo.bar([  ]) ? [a,b]=[] : [a,b]=[]; // Not a Syntax Error

But when you add that one extra StringLiteral, it becomes a SyntaxError
0 < foo.bar(['']) ? [a,b]=[] : [a,b]=[]; // Syntax Error

What is the expected behavior?
The code parses and throws a Runtime Error

What went wrong?
Detected Syntax Error wrong

Did this work before? No 

Chrome version: 56.0.2924.87  Channel: stable
OS Version: OS X 10.12.3
Flash Version: 

Original Context: https://github.com/babel/babili/issues/476#issuecomment-286562722
 
Labels: Needs-Milestone

Comment 2 by hdodda@chromium.org, Mar 15 2017

Cc: hdodda@chromium.org
Labels: -Needs-Milestone M-59 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Tested on mac os 10.12.2 , windows 7 and ubuntu 14.04 using M57 #57.0.5987.98 and M59 #59.0.3041.0 and issue is reprodued.

Issue is seen from M50 #50.0.2624.0 and till M49 behavior of issue is different and is a non-regression issue.

Marking it as untraiged for further inputs on this.

Attached screenshot of the difference in chrome milestones.

Thanks!


701548.png
78.7 KB View Download
Components: -Blink Blink>JavaScript
Cc: adamk@chromium.org
Components: -Blink>JavaScript Blink>JavaScript>Language
Status: Available (was: Untriaged)
Adamk@, is this as expected or a bug? Feel free to close this one with WontFix right away.

Comment 5 by adamk@chromium.org, Mar 22 2017

Mergedinto: v8:6098
Status: Duplicate (was: Available)

Sign in to add a comment