Open
Description
I'm not well versed with the ES6 spec details, but from my understanding, there is some optional behavior for block-level function declarations that escope
does not take into account.
In the following code:
// ES6
function foo() {
{
function bar() {};
}
bar(1);
}
the call to bar
would not throw a ReferenceError
if the web compatibility semantics extension is in effect.
The escope
output for this code with {ecmaVersion: 6}
does not link the bar
reference with the bar
declaration at all. Maybe an additional webExtensions
flag for escope.analyze
is needed.
Metadata
Metadata
Assignees
Labels
No labels