Skip to content

vars not reported as reassigned/mutated when directly done in template #3793

@Conduitry

Description

@Conduitry
<script>
	let foo = 0;
	let bar = 0;
</script>
{() => foo = 1}
{bar = 1}

The vars in the compiler output reports foo as reassigned, but does not report bar as ever reassigned. I don't know what effects this might have on the compiled output, but for the ESLint plugin with prefer-const enabled, it does result in bar being erroneously turned into a const.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions