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
I've been catching up on some spec reading, and noticed the example in the scopes proposal. The bracketed region is the region where message -> _m is renamed in the proposal:
since _m can be used in parameter initializers of later arguments, for example function _z(_m, _k = _m) {. Similarly in loop statements one can do stuff like for (const { a, b = a } of arr).
I suspect this may be a common problem for generators since it's not really a 'scope range' as a programmer may normally think of it, so it may be worth calling out or at least updating the example.
The text was updated successfully, but these errors were encountered:
I've been catching up on some spec reading, and noticed the example in the scopes proposal. The bracketed region is the region where
message -> _m
is renamed in the proposal:Instead, it should be
since
_m
can be used in parameter initializers of later arguments, for examplefunction _z(_m, _k = _m) {
. Similarly in loop statements one can do stuff likefor (const { a, b = a } of arr)
.I suspect this may be a common problem for generators since it's not really a 'scope range' as a programmer may normally think of it, so it may be worth calling out or at least updating the example.
The text was updated successfully, but these errors were encountered: