Variable declaration
Reported by
himan.w...@dxbiz.com,
Jan 18 2018
|
|||||
Issue descriptionUserAgent: 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).
,
Jan 18 2018
This also work in Firefox, line 3 allow assignment of value to variable 'a'.
,
Jan 19 2018
,
Jan 19 2018
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!
,
Jan 19 2018
,
Jan 30 2018
,
Jan 31 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by krajshree@chromium.org
, Jan 18 2018