-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[enums] Move exhaustive checking logic to flow_js.ml
Summary: Move exhaustive checking logic to flow_js.ml. This does several things: - Cleans up the code a bit as we no longer need to store information in the context - We no longer need to have logic for getting the resolved type of case tests (e.g. the former `search_for_enum_object_type`) - This allows exhaustive checking to potentially introduce flows in the future, if desired General idea is that we initially use `EnumResolveDiscriminant` and resolve and store the information about the discriminant, and then use `EnumResolveCaseTest` to resolve each case test one by one, adding them as `checks` if they are valid. Finally, when there are no `possible_checks` left, we trigger the exhaustive checking logic. Based off of an idea by samwgoldman Reviewed By: samwgoldman Differential Revision: D21758989 fbshipit-source-id: 0d70ecb3e478724e09738cc2536cb58a9c0dd6fe
- Loading branch information
1 parent
a193b68
commit 71939e7
Showing
12 changed files
with
287 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.