Renaming struct field does not warn for duplicate names #6444
Labels
Component: Core
Issue needs changes to the core
Effort: Medium
Issue should take < 1 month
Impact: Medium
Issue is impactful with a bad, or no, workaround
Version and Platform (required):
Bug Description:
When renaming a struct field, there is no warning/error if a member of the same name already exists. Trying to rename the second field to a different name then results in the wrong field having it's name changed.
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
rax
from first line to create new struct__offset(0x0)
on second line and set type tovoid* buf
__offset(0x8)
on third line and set type tovoid* buf
. Observe that both fields have same name nowbuf
on third line to rename it tobuf2
. Observe that name of first field changed instead of the correct one.Expected Behavior:
I think the best behavior would be similar to what happens when you try to name duplicate local variables. A warning that tells you it is a duplicate and lets you confirm / confirm with suffix / cancel.
Alternatively, just making it entirely disallowed and making it an error would also work.
The issue with renaming a field resulting in the renaming of a different field should also be fixed.
Screenshots/Video Recording:
CleanShot.2025-02-23.at.10.22.34.mp4
Binary:
test.zip
Additional Information:
Please add any other context about the problem here.
The text was updated successfully, but these errors were encountered: