Skip to content

RD won't allow a rename of an enum member with otherwise illegal characters. #3242

Open
@ThunderFrame

Description

@ThunderFrame

Standard naming rules don't apply to enum members (or enums themselves), this code is perfectly legal (but might be worthy of an inspection). At the very least, a leading underscore should be permitted in order to take advantage of the hidden enum member feature.

Enum Foo
  Apple = 1
  [_Min] = 1
  [`~!@#$%^&*()-_+=[']\/?{}|<>,.;:"] = 3
End Enum

A more difficult issue relates to the name of an enum, as per #2568, where special characters are also allowed, but the VBE pretty printer fails to add/retain the necessary square brackets:

Enum [`~!@#$%^&*()-_+=[']\/?{}|<>,.;:"]
  Apple = 1
  [_Min] = 1
  [`~!@#$%^&*()-_+=[']\/?{}|<   spaces!   >,.;:"] = 3
End Enum

'pretty print to become:

Enum `~!@#$%^&*()-_+=[']\/?{}|<>,.;:"
  Apple = 1
  [_Min] = 1
  [`~!@#$%^&*()-_+=[']\/?{}|<   spaces!   >,.;:"] = 3
End Enum

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies work items for known bugsedge-caseMarks a bug as an edge case that would be nice to fix, but that likely doesn't affect normal use.feature-refactorings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions