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

Issue 803480 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue v8:7380
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Variable declaration

Reported by himan.w...@dxbiz.com, Jan 18 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. let a = aaa(); // Reference error: 'aaa' is not defined
2. let a = 1; // Syntax error: identifier 'a' has already been declared
3. a = 1; // Reference error: a is not defined

What is the expected behavior?
 Line 2 should be successful since the initializer of line 1 is invalid. Or line 3 should be successful since line 2 stated that identifier 'a' has already been declared.

What went wrong?
Line 1 failed is correct, since aaa() does not exist. However line 2 indicate the variable 'a' has been created disregard line 1 failed. Now, line 3 is in contradiction with line 2. Dead lock for variable 'a'.

Did this work before? N/A 

Chrome version: 63.0.3239.132  Channel: stable
OS Version: 10.0
Flash Version: 

This work as expected in Edge (line 2 work as expected).
 
Labels: Needs-Triage-M63
This also work in Firefox, line 3 allow assignment of value to variable 'a'.

Comment 3 by tkent@chromium.org, Jan 19 2018

Components: -Blink Blink>JavaScript
Labels: Hotlist-Interop
Able to reproduce the issue on reported chrome version 63.0.3239.132 and on the latest canary 65.0.3325.0 using Mac 10.12.6, Windows 10 and Ubuntu 14.04. As the issue is seen from M50(50.0.2661.0) considering it as non-regression and marking it as Untriaged.

Thanks!
Cc: viswatej...@techmahindra.com sc00335...@techmahindra.com
Labels: Triaged-ET M-65 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Cc: adamk@chromium.org
Components: -Blink>JavaScript Blink>JavaScript>Language
Status: Available (was: Untriaged)

Comment 7 by adamk@chromium.org, Jan 31 2018

Mergedinto: v8:7380
Owner: gsat...@chromium.org
Status: Duplicate (was: Available)

Sign in to add a comment