-
Notifications
You must be signed in to change notification settings - Fork 260
Open
Description
Describe the Bug
When a class defines __slots__, pyrefly shouldn't allow writing to attributes that aren't specified in __slots__. This is tested in the dataclasses_slots conformance test, which we currently fail:
pyrefly/conformance/third_party/dataclasses_slots.py
Lines 24 to 25 in 47f5efe
| # This should generate an error because "y" is not in slots. | |
| self.y = 3 # E |
Sandbox Link
(Only applicable for extension issues) IDE Information
No response