Reusing variable previously defined with walrus operator triggers used-before-def error #14626
Labels
bug
mypy got something wrong
topic-pep-572
PEP 572 (walrus operator)
topic-possibly-undefined
possibly-undefined error code
To Reproduce
Expected Behavior
Should be no errors -- this code does not error using mypy v0.991 or prior, so this seems to be a new issue with v1.0.0.
Actual Behavior
error: Name "y" is used before definition [used-before-def]
Your Environment
The text was updated successfully, but these errors were encountered: