Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
7nik opened this issue Apr 25, 2025 · 0 comments · May be fixed by #15862
Open

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

7nik opened this issue Apr 25, 2025 · 0 comments · May be fixed by #15862

Comments

@7nik
Copy link
Contributor

7nik commented Apr 25, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant