-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract fun types instead of coercing
Summary: `Narrow.extractFunTypes` is mostly identical to `Narrow.asFunType` except it filters out non compatible types, while the latter performs an early return with `None` in that case. However, `Narrow.asFunType` is always used with `.get` and after a check that the type is actually compatible, thus defeating the point of the optional result. This diff migrates everything to `extractFunTypes`, the semantics are unchanged. Reviewed By: ilya-klyuchnikov Differential Revision: D62570404 fbshipit-source-id: 9ee92cb7bfe736df56032f41fcc89ef05bae629e
- Loading branch information
1 parent
5ca1650
commit 114a361
Showing
4 changed files
with
6 additions
and
38 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 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