Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
warn on enum comparison to bool or float
Summary: Seen some bugs in user code where people inadvertently compare enum to `bool`. This can cause accidental equality with enums that have value `0` and `1`. Only doing in debug mode. Comparison with `cFollyDebug` cpp constant should mean entire `if` block is removed in `opt`. Second change, allow "kwarg-style" call to `EnumMeta`. E.g., `Color(value=2)`. This allows thrift-py3 enums to use this metaclass. Reviewed By: yoney Differential Revision: D62667187 fbshipit-source-id: a25630a3a21ae472eda9fbd6671dccd02af9a134
- Loading branch information