constants are not accessible inside functions not defined inside a try-catch block
Reported by
derek.se...@sap.com,
Aug 4 2016
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Steps to reproduce the problem: Create a javascript file with global constants (keyword const es6). Try to access them inside a function. Now define the functions inside a try-catch block and try again. What is the expected behavior? Global constants should always be accessible within functions. What went wrong? Global constants are not in scope unless the function is defined within a try-catch block. Did this work before? N/A Chrome version: 52.0.2743.116 Channel: stable OS Version: 6.3 Flash Version: Shockwave Flash 22.0 r0
,
Aug 5 2016
,
Aug 5 2016
,
Aug 5 2016
Related to https://bugs.chromium.org/p/v8/issues/detail?id=3305 ?
,
Aug 5 2016
Without a clearer outline of the reported problem there's not much I can do. For example, the following code works fine:
```
const foo = 5;
function f() {
return foo;
}
```
as would:
```
const foo = 5;
try {
function f() {
return foo;
}
} catch (e) {}
```
,
Aug 8 2016
Closing until a repro is supplied.
,
Aug 8 2016
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tkent@chromium.org
, Aug 4 2016