You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6f2b772
Browse filesBrowse the repository at this point in the historyBrowse files
[ty] Preserve nominal type of enum.property instances (#25849)
## Summary
This is a follow-up to #25681 that preserves the nominal class of
synthesized property instances created by `enum.property`.
Previously, `PropertyInstanceType` always fell back to
`builtins.property`. That discarded the `enum.property` identity, so
assignments to `enum.property` failed and enum-specific members such as
`name`, `clsname`, and `member` were unavailable. The originating known
class is now retained through accessor replacement, type
transformations, member lookup, descriptor dispatch, relations, `super`,
and display.
The regression coverage also checks precise getter and setter behavior.
A TODO documents the remaining limitation that constructing a subclass
of `enum.property` currently collapses the result to `enum.property`.
## Test Plan
Added/updated mdtests.
0 commit comments