Closed
Description
To Reproduce
x = 3
z = (y := str(x)).index(y.lower())
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
- Mypy version used: 1.0.0
- Mypy command-line flags: none
- Python version used: 3.9