You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see from the result output, the parameter list peculiarly has its own scope which is distinguishable when there's a closure in the parameter list. The a of value 5 is different from the a of value 2.
So, I would expect to get 4 scopes here from escopes:
The outer scope
The main function (x()) scope
The intermediate parameter scope (where the parameter a and b comes from)
The scope of the b() function
However, (3) is missing from the escopes output. Moreover, the a (parameter) and b (parameter) are recorded as belonging to the function (x()) scope. Usually that wouldn't matter and would be OK, but when there's a parameter list closure, it matters. There should be 3 variables (both as and the b) in the function, but there's only 2.
This inaccuracy is affecting my usage in ESLint, which I believe uses escopes. I can't fully accurately detect that a parameter is used or not if I cannot distinguish between the two as in that above code snippet.
The text was updated successfully, but these errors were encountered:
Apologies if this is a known problem. I couldn't quite tell from my review of existing issue threads.
My problem is related to the scopes set up by this code:
As you can see from the result output, the parameter list peculiarly has its own scope which is distinguishable when there's a closure in the parameter list. The
a
of value5
is different from thea
of value2
.So, I would expect to get 4 scopes here from escopes:
x()
) scopea
andb
comes from)b()
functionHowever, (3) is missing from the escopes output. Moreover, the
a
(parameter) andb
(parameter) are recorded as belonging to the function (x()
) scope. Usually that wouldn't matter and would be OK, but when there's a parameter list closure, it matters. There should be 3 variables (botha
s and theb
) in the function, but there's only 2.This inaccuracy is affecting my usage in ESLint, which I believe uses escopes. I can't fully accurately detect that a parameter is used or not if I cannot distinguish between the two
a
s in that above code snippet.The text was updated successfully, but these errors were encountered: