-
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.
Fix ParamSpec bug where we do not propagate type vars in typecheck
Summary: I'm going to try migrating some of IG's code. In the process, I found a bug where we do not properly propagate type vars in defines. Specifically, we need to collect the type variables from PEP695 in the typechecker in various places, and there was a place where did not do that. If we do not collect them, the parser will return "unknown" giving incorrect typechecking results. I added a legacy example as well to show that they both have the correct behavior and are matching (modulo qualification). Note: the bug I got on IG was actually just "invalid syntax". Here's the diff with the error msg D65066009. This is strange though, since that sound like a parsing error and we should not be getting those. Reviewed By: grievejia Differential Revision: D65078436 fbshipit-source-id: b8e297ba24751bea85f0ab173775a8bb1b560a19
- Loading branch information
1 parent
43ba1fe
commit 7661930
Showing
2 changed files
with
58 additions
and
6 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