-
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.
[flow] More principled opaque type underlying_t unwrapping
Summary: This diff is a different approach that tries to solve the same problem D55411073 tries to solve: the current system to decide whether we unwrap underlying_t is error prone. We depend on reason's source equality to decide whether the operation and the opaque type are in the same file. Especially for the reason of opaque type, we are not even using the def location. Reasons are unreliable. This diff switches to use ALoc.id's source and `Context.file`. The opaque type's id will always have source that's the defining file of the type, and `Context.file` always return the current file we are checking, so this is actually bulletproof. Changelog: [errors] We fixed a bug that causes opaque type's underlying representation to leak beyond the file it's defined. You might see more errors as a result. Reviewed By: panagosg7 Differential Revision: D67147723 fbshipit-source-id: a2b18c7648be6947f89c157959bb605d4f9c75af
- Loading branch information
1 parent
a87d923
commit 469961d
Showing
2 changed files
with
38 additions
and
12 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