-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
RuntimeError: Internal error: unresolved forward reference #4376
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
Maybe related: #4385 |
FWIW another report of this came in. The code was something like this class SomeClass(object):
def foo(self):
# type: () -> SomeNamedTuple
SomeNamedTuple = NamedTuple('SomeNamedTuple', [('bar', List[SomeClass])]) The fix was to move the named tuple before the class. |
This particular code however doesn't crash, there must some additional ingredient for the crash. I tried to play with |
It wasn't due to |
Confirmed that this crash is gone with the latest mypy. |
We got the same exception as #4370 (though with a somewhat different traceback). The user sent me a repro (which I have not managed to confirm):
The traceback ended in:
However there must be something else because the test program does not repro the crash.
The text was updated successfully, but these errors were encountered: