-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
When the Svelte 5 compiler sees a +=, it generates code like the following:

In this case, $.proxy() will always just return the value it’s passed, since it’s impossible for an addition expression in JS to return a non-primitive value. The compiler should probably just not wrap the expression in $.proxy() (though I get that the overhead and additional code size here is minor).
Reproduction
Logs
No response
System Info
Svelte v5.0.0-next.26 (in Svelte 5 playground)Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels