You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot define variable with name that is used in getter and setter #77
When a variable is removed from a local initialization but still referenced in a getter/setter, the getter correctly shows an error (Select a valid item in the drop down). However, re-adding the initialization should resolve the error. Instead, the naming logic forces a new variable name, preventing the original reference from being restored.
Screencast.from.2025-08-27.08-30-01.webm
I assume this isn’t the intended behavior, but if it is, feel free to close this issue.
Hey! @TannerGabriel . I looked into this and I think I found what's happening.
When you remove a variable but the getter is still there, the system sees that name as "in use" even though it's basically broken/orphaned. So when you try to add the variable back, it thinks there's a conflict and renames it to x2.
I think in this we need to ignore those orphaned references when checking for name conflicts. I've got a fix ready, will open a PR soon.
When a variable is removed from a local initialization but still referenced in a getter/setter, the getter correctly shows an error (
Select a valid item in the drop down). However, re-adding the initialization should resolve the error. Instead, the naming logic forces a new variable name, preventing the original reference from being restored.Screencast.from.2025-08-27.08-30-01.webm
I assume this isn’t the intended behavior, but if it is, feel free to close this issue.