-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Narrow types for walrus assignment in if statements #8258
Conversation
Let me know if there's a better way to handle the partial types that can result! Or if there are more tests I should be adding. There's a lot that I don't know :-) I guess one thing I was wondering if there's a way to improve the hint resulting from the partial type (see line 296 on |
I doubt that a lot of users are going to write |
Will you have an interest in testing against #7313 to see if the PR also happens to fix that issue? (Although I am not sure at all whether these issues come from the same source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me and is really important since this sort of thing is the killer feature of assignment expressions.
Fixes #7313
Fixes #7316