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
the function g(){} declares two variables named g: one scoped to the block, and one scoped to the function. That we get right. But the declaration also has semantics when control reaches it: it reads from the block-scoped declaration and writes to the function-scoped declaration. These references are not captured.
Getting this right is going to be hard: currently the scope analysis assumes that we know all the references to variables within a scope once we have finished analyzing it, but here we don't know if these two references (one of which is to a variable in the block) exist until we finish analyzing the function (because they would not exist if the block were followed by ; let g;).
The text was updated successfully, but these errors were encountered:
In a script like
the
function g(){}
declares two variables namedg
: one scoped to the block, and one scoped to the function. That we get right. But the declaration also has semantics when control reaches it: it reads from the block-scoped declaration and writes to the function-scoped declaration. These references are not captured.Getting this right is going to be hard: currently the scope analysis assumes that we know all the references to variables within a scope once we have finished analyzing it, but here we don't know if these two references (one of which is to a variable in the block) exist until we finish analyzing the function (because they would not exist if the block were followed by
; let g;
).The text was updated successfully, but these errors were encountered: