Closed
Description
Destructuring and Narrowing
- If you narrow with
"a" in value
whenvalue
is generic, and then graba
withvalue.a
, it works, but doesn't with destructuring.- Inconsistent!
- Sometimes it makes sense to get the base constraint in destructured valies instead of the generic, and sometimes it's best to keep the original type.
- But threading the code to do that is difficult.
- Lots of bug reports where people say "oh no, I wanted the deferred version" or "I want the base constrained person"
- Seems like there are a well-understood set of cases that can be iterated on in the PR.