Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: I'm preparing for a major refactor where class attributes are modeled in terms of get and set actions on instance vs class objects, which is needed to handle - static typing rules like `final` that allow get but nut set actions - lots of built-in descriptors like `property` and `classmethod` - eventually user-defined descriptors The change is going to require rethinking `ClassField`, through which all of the metadata needed for attribute actions must flow. One thing that would easily get in the way is if Pyre2 as a whole is relying on the internals of `ClassField`, which should not happen (that data structure exists *only* for `classes.rs` to model how attribute access actually works). This diff enforces that by making all the internals of `ClassField` private; the type itself is still public because `AnswersSolver` still has to be aware of it (otherwise we couldn't write down the `Keyed` instance for `BindingClassField`), but the bindings table doesn't need to know anything about the internals. Reviewed By: ndmitchell Differential Revision: D68662438 fbshipit-source-id: f86f777bf67b89f64913fe897eb6bc4470496399
- Loading branch information