Closed
Description
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]
==