Skip to content

Svelte 5: Error: Argument name clash #9927

@98mux

Description

@98mux

Describe the bug

if you mention a store by "store" and "$store" in an onclick function then the JS output becomes

"var on_click = (_, store, store, $store) => {
if (store && $store()) {}
};",
store is duplicated in the arguments, causing the error

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA0VP0QrDIAz8lSCja2HQPUtb2Hese2htCjKronFjiP--ahkjEHLH3SWJbJUKPeP3yPS0IePsZi27MPrYDPwLFeGOvQlOZKbzwklLw6hHkps1jiC-naRpVphgdWaD8-FqPRmH5yxUSFAQ9PAT19dm1F37j9PdHIiMBqOFkuLZx7qBfoBYVq31EVBVcCpTU_i99p5GnVI5qTg9hyhM0Jnv2iN12J_YzCJXiQvj5AKmR_oC33-SI_8AAAA=

Logs

No response

System Info

repl

Severity

annoyance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions