Skip to content

Unnecessary assignment_value_staleAssignment warning #16605

@timephy

Description

@timephy

Describe the bug

onclick: () => (media.deaf = !media.deaf) causes the assignment_value_staleAssignment warning to be printed to the console while onclick: () => { media.deaf = !media.deaf } does not.

(Above is object property syntax, which is then fed to a snippet)

Reproduction

Logs

System Info

System:
    OS: macOS 15.6
    CPU: (20) x64 Intel(R) Xeon(R) W-2150B CPU @ 3.00GHz
    Memory: 565.61 MB / 64.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 24.5.0 - /usr/local/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 11.5.1 - /usr/local/bin/npm
    pnpm: 10.13.1 - /usr/local/bin/pnpm
    bun: 1.0.25 - /usr/local/bin/bun
  Browsers:
    Chrome: 139.0.7258.67
    Safari: 18.6
  npmPackages:
    svelte: 5.37.3 => 5.37.3

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    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