Commit 7409a97
Summary:
Fixes #2789
stops ClassVar members from being classified as frozen dataclass fields.
preserves the existing ClassVar write restriction on instances, but no longer incorrectly rejects writes through a class object like `self.__class__.x = False` in a frozen dataclass.
Pull Request resolved: #2792
Test Plan: add test
Reviewed By: grievejia
Differential Revision: D96812149
Pulled By: rchen152
fbshipit-source-id: 467eac510e0a47f519c32a23db99f03dc4d12b3a
1 parent 6d21b41 commit 7409a97
2 files changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2118 | 2118 | | |
2119 | 2119 | | |
2120 | 2120 | | |
| 2121 | + | |
| 2122 | + | |
2121 | 2123 | | |
2122 | 2124 | | |
2123 | 2125 | | |
| 2126 | + | |
2124 | 2127 | | |
2125 | 2128 | | |
2126 | 2129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
795 | 810 | | |
796 | 811 | | |
797 | 812 | | |
| |||
0 commit comments