-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deduplicate entries when creating typed dicts from dict literals
Summary: Overview: This fixes a Pyre crash reported from the Pyre + Pysa chat. Background: The root cause is that dictionary literals with duplicate entries were not being deduplicated when generating anonymous typed dictionary types in weakenMutableLiterals. The change in D63430844 crashes when typed dict types have duplicate fields, which seems OK since duplicate fields makes no sense and shouldn't be allowed here. Solution: This diff fixes the issue by deduplicating the fields before constructing the typed dictionary type. Reviewed By: samwgoldman, rchen152 Differential Revision: D64914727 fbshipit-source-id: d06cf1b4c55583d9d5e2fab26e88c299284f7ad2
- Loading branch information
1 parent
1e7c05e
commit 887fe84
Showing
3 changed files
with
29 additions
and
1 deletion.
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