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
[flow][match] Propagate hints through match expressions case bodies
Summary:
We need to propagate hints through match expressions case bodies.
The simple case is when we have some external hint. More interesting is getting hints from sibling case bodies. This can come out of order, and indeed this might be a common pattern with match expressions as people like to list their edge cases first. E.g.
```
declare const x: number;
const out = match (x) {
0: [],
const x: [x],
};
```
So, we consider every sibling case body, from top to bottom, as a "best effort hint".
The logic for hints diverges the match statement and match expression logic, so I break these up again into seperate methods.
Changelog: [internal]
Reviewed By: panagosg7
Differential Revision: D70140524
fbshipit-source-id: 499d5e8864964c32c6bce372743dec2adb4781cf
0 commit comments