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
Note that there are two references with name c and isWrite() true: that is, two write references to c. This despite the fact that c will be written precisely once by the sample code. This is especially confusing if you're looking at const-correctness.
Is this intentional? If so, what's the reasoning behind it?
The text was updated successfully, but these errors were encountered:
escope has been making a writable reference for variable initializers, so I treated default parameters and default values of destructuring as same as that.
Currently, references for initializers, default parameters, and default values are have a property init as true.
(@michaelficarra)
See for example this test:
escope/test/es6-destructuring-assignments.coffee
Lines 340 to 346 in f237eef
Note that there are two references with name
c
andisWrite()
true: that is, two write references toc
. This despite the fact thatc
will be written precisely once by the sample code. This is especially confusing if you're looking at const-correctness.Is this intentional? If so, what's the reasoning behind it?
The text was updated successfully, but these errors were encountered: