-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fine grained crash when class is turned into a generic class #3279
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
Comments
I can also cause a crash if I switch a generic class into a non-generic one. However, I need to switch the order of assignments in the second version: ...
reveal_type(a.f)
c: C[int]
d = a.f()
c = d # this comes first now
d = c |
I think this could be also a symptom of another problem: there are many places where e.g. |
These are all wrong. We should only create |
OK, then a possible "robust" solution would be to remove |
The quick mode was deprecated and is now removed, but now the same crash happens in the fine-grained mode. (Same files and the same traceback.) |
(Removed the incremental label, since the crash doesn't happen in the normal incremental mode.) |
Here is the full test case:
|
Fixes #3279. Also fixes another related crash.
Fixes #3279. Also fixes another related crash.
a.py
:Original
b.py
:Updated
b.py
:Now if I run
mypy --quick a.py
first with the original files, then with the updatedb.py
, I get a crash:The text was updated successfully, but these errors were encountered: