Skip to content

Assignment shorhands to private stateful field aren't proxified #15832

@7nik

Description

@7nik

Describe the bug

// input
#c = $state();
...
this.#c ??= {val: 0}

// observed output
$.set(this.#c, this.#c.v ?? { val: 0 });

// expected output, I guess
$.set(this.#c, this.#c.v ?? { val: 0 }, true);

Reproduction

REPL

Logs

System Info

5.28.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions