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
It's definitely not a bug in Node.js but a quirk of JavaScript.
By the spec, the semicolon ; is important in this case. Without the ;, the {}[expression] is intepreted as property access. So the first snippet is equivalent with
constf2=async()=>{letmatch={a: 10};leta,b;// match is `[10, 12]`, as you can verify.match=({
...match,b: 20}[a,b]=awaitf1(match));}
Version:
v12.18.3 and v14.5.0
Platform:
Linux pop-os 5.11.0-7612-generic Failed assert in AsyncWrap::MakeCallback(uint32_t, int, Handle) from test-timers-unref.js on ARM #13
161721575720.04~97a8d1a-Ubuntu SMP Thu Apr 1 21:15:20 UTC 2 x86_64 x86_64 x86_64 GNU/LinuxSubsystem:
Not sure
What steps will reproduce the bug?
and
These codes give different outputs. The only difference is a semicolon after match
How often does it reproduce? Is there a required condition?
Every time. No required condition, I think.
What is the expected behavior?
{ a: 10, b: 20 }
What do you see instead?
{ a: 10 }
Additional information
The text was updated successfully, but these errors were encountered: