Skip to content

Refreshing synthetic types causes fine-grained crash #4665

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

Closed
msullivan opened this issue Mar 2, 2018 · 0 comments
Closed

Refreshing synthetic types causes fine-grained crash #4665

msullivan opened this issue Mar 2, 2018 · 0 comments
Assignees

Comments

@msullivan
Copy link
Collaborator

msullivan commented Mar 2, 2018

It looks like we definitely do need to handle non-TypeList synthetic types in merge.

These two tests fail now but passed before #4652:

[case testReprocessEllipses1]
import a
[file a.py]
from typing import Tuple
def foo(x: Tuple[int, ...]) -> None: pass
[file a.py.2]
from typing import Tuple
def foo(x: Tuple[int, ...]) -> None: pass
[builtins fixtures/tuple.pyi]
[out]
==

[case testReprocessEllipses2]
import a
[file a.py]
from typing import Callable
def foo(x: Callable[..., int]) -> None: pass
[file a.py.2]
from typing import Callable
def foo(x: Callable[..., int]) -> None: pass
[out]
==

This one now fails with a synthetic type visitor error (and fails with assert symbol.kind != UNBOUND_IMPORTED before #4652):

[case testReprocessCallableArg]
import a
[file a.py]
from typing import Callable
from mypy_extensions import Arg
def a(f: Callable[[Arg(int, 'x')], int]) -> None: pass
[file a.py.2]
from typing import Callable
from mypy_extensions import Arg
def a(f: Callable[[Arg(int, 'x')], int]) -> None: pass
[out]
==
@JukkaL JukkaL self-assigned this Mar 2, 2018
JukkaL added a commit that referenced this issue Mar 2, 2018
Previously we only handled one kind of synthetic type, and others would
cause a crash.

Fixes #4665.
msullivan pushed a commit that referenced this issue Mar 2, 2018
Previously we only handled one kind of synthetic type, and others would
cause a crash.

Fixes #4665.
yedpodtrzitko pushed a commit to kiwicom/mypy that referenced this issue Mar 15, 2018
Previously we only handled one kind of synthetic type, and others would
cause a crash.

Fixes python#4665.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants