forked from facebook/pyre-check
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add plumbing for send type inference
Summary: Here, we add the keys and bindings needed for send type inference. The only thing that remains is: In answers.rs for the `Binding::SendTypeOfYield(_)`, we must lookup the return annotation and extract the send type from there if it exists. The key would be `&KeyAnnotation::ReturnAnnotation(function_name.clone())`. However, using self.get to retrieve the annotation causes panic if the key is not found. It looks like we can consider `std::panic::catch_unwind` but it seems this is unsafe behavior. Should we modify the `get` method to return an optional? This is something to address next. Once we do this, the send type will be correctly inferred. Reviewed By: stroxler Differential Revision: D68468322 fbshipit-source-id: 4464a1159defed48062d5747ac4e63a237ae3a81
- Loading branch information
1 parent
277952f
commit ca8fa3d
Showing
8 changed files
with
73 additions
and
208 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
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.