-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
Originally discovered here: #13250 (comment).
Auto-migration generates invalid code when a reactive $:
variable is assigned to an expression in parenthesis. So, when trying to process:
$: double = (console.log(double), count * 2);
it outputs
let double = ($derived(console.log(double), count * 2);
which is obviously wrong. Parenthesis are mismatched and put in the wrong places. The compiler gives:
Error compiling App.svelte
Unexpected token
Reproduction
Logs
No response
System Info
N/A
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels