Currently, when you reference an enumerator in Slice, it's optional whether or not you include it's enum's scope:
enum MyEnum { A, B }
const C1 = MyEnum::A;
const C2 = B;
Both of the above are legal Slice statements, but currently, the compiler will issue a warning for the 2nd one (omitting the enum).
It's kind of like C-style vs C++-style enums. in C, the enumerators are dumped in the enclosing scope, in C++, the enum class is a new scope. Note that if the compiler cannot unambiguously determine what you're referring to (when using the 2nd unscoped syntax) we will issue an error, so there's no concern there.
The only places where it's legal to reference an enumerator in Slice is:
specifying the tag id of an optional
specifying a constant/default value
specifying the compact ID of a class (but it's the opposite... we issue a warning is you do scope the enumerator? Also removed)
Since this feature is not broken, documented, and possibly in use by people, this PR simply undeprecates it.
There is no other change in behavior.
Currently, when you reference an enumerator in Slice, it's optional whether or not you include it's enum's scope:
Both of the above are legal Slice statements, but currently, the compiler will issue a warning for the 2nd one (omitting the enum). It's kind of like C-style vs C++-style enums. in C, the enumerators are dumped in the enclosing scope, in C++, the
enum class
is a new scope. Note that if the compiler cannot unambiguously determine what you're referring to (when using the 2nd unscoped syntax) we will issue an error, so there's no concern there.The only places where it's legal to reference an enumerator in Slice is:
Since this feature is not broken, documented, and possibly in use by people, this PR simply undeprecates it. There is no other change in behavior.