-
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.
Do not use infer_variance with covariant and contravariant flags
Summary: We should not use infer_variance when we've already defined covariance or contravariance flags. We could not catch this before because the variable definitions are not expressive enough. In this diff, we fix this issue by extending variable declarations to include the infer_variance flag, as existing variable declarations erased that information. Then when we reach typecheck, we can check the flag, along with the variance information we parsed and raise the right error message. This diff includes adding the new error message defintion and a unit test. We can now see the conformance improvement. Reviewed By: stroxler Differential Revision: D65041792 fbshipit-source-id: 4b5a1e391b348f8fb786140fd3882aa1289a7a8c
- Loading branch information
1 parent
4570f27
commit f6f2a48
Showing
7 changed files
with
64 additions
and
5 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