Closed as not planned
Description
π Search Terms
"enum leading 0", "enum numeric"
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about "enums"
β― Playground Link
π» Code
enum TestEnum{
"_0" = "does work as it should"
"0" = " does not work as it should not",
"00" = "works but should not",
"01" = " works but should not",
}
TestEnum._0
TestEnum.0
TestEnum.00
TestEnum.01
π Actual behavior
An enum can be set with a numeric key when a leading 0 is added.
π Expected behavior
The enum keys "00", "01", ... should not be allowed to be set, as they are unvalid to write as TestEnum.00
, TestEnum.01
, ...
Additional information about the issue
No response