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 invalid syntax. nodeREPL parses it as an expression, but it's not a valid statement. The specification says it's a block statement if a line starts with {
Describe the bug
Problem
{ a } = { a: 1 }
works in Node.js well, but fails to be parsed by SWC.Result in Node.js
Result in SWC
Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.5.5&code=H4sIAAAAAAAAA6tWSFSoVbBVqFZItFIwVKgFABuN%2F0gQAAAA&config=H4sIAAAAAAAAA1VPOw6DMAzdOUXkuQNi6NA79BBWalBQfopTqRHi7g350LL5%2FfzsbRACVpbwEFseM%2FAYmMKJM8PJRvxkBkgaZBmUj3Dr6sqHNKNmKtReFYgYFoolxdM4jS0B2jmmnmicUVbN6b9TOuMDMV%2BNhxXtounaOLRWMO71LmL7JSZP9YI7%2FEy97FwMip89WdfuX4b2MUIYAQAA
SWC Info output
1.5.5
Expected behavior
{ a } = { a: 1 }
should pass the syntax check.Actual behavior
No response
Version
1.5.5
Additional context
No response
The text was updated successfully, but these errors were encountered: