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
{{ message }}
Repository navigation
Block-scoped const shadowing a module-level function leaks: outer new C() resolves to the block binding (unconfirmed on main) #11160
Found while fixing CodeRabbit's comment on #11137 (see #11137 (comment)). Not yet confirmed on a main build. It was observed on the #11137 branch, but the snippet has no new inside the block, so it never reaches the code that PR changes.
A block-scoped const C that shadows a module-level function C makes a later new C().k in the OUTER scope return undefined, where Node gives 1. That suggests the block binding leaks into name resolution outside its block.
Activity