Open
Description
Describe the bug
Found this issue while working on #15673. Basically, if you have a function (or other thing that adds a new this
binding without being a class) inside of a class method, Svelte will still wrap any private property access with $.get
/$.set
.
I feel like accessing private properties inside this
scopes that aren't classes should probably be a syntax error, but if not, at least this should be fixed. I put in a check for this in the code for $state.invalidate
, so it shouldn't be too hard to fix for everything else.
Reproduction
Logs
System Info
N/A
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels