-
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.
Fix subtyping dict < shape being too lenient
Summary: The root cause of D56416941 is subtyping being too lenient for dynamic dicts to shapes, causing dynamic dicts to be "approximated away" when joining types. This fixes it by considering `#{dynamic() => dynamic()}` to be a subtype of any shape only when the subtyping polarity of the dict is negative. Also change `narrow.adjustMapType` to preserve dynamic maps, to avoid introducing too much noise. Reviewed By: ilya-klyuchnikov Differential Revision: D56416893 fbshipit-source-id: 88e3f68b9e88f6d8b61556a3edbbdad2933a4235
- Loading branch information
1 parent
1dbdbbd
commit f2556cd
Showing
5 changed files
with
32 additions
and
67 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