-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
crashtopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenatetopic-pep-646PEP 646 (TypeVarTuple, Unpack)PEP 646 (TypeVarTuple, Unpack)
Description
This should not be a crash, it should be handled properly and show an error.
from typing import Generic, ParamSpec, TypeVarTuple, Unpack
P = ParamSpec("P")
Ts = TypeVarTuple("Ts")
class C(Generic[P, Unpack[Ts]]): ...
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "mypy/semanal.py", line 6525, in accept
File "mypy/nodes.py", line 1140, in accept
File "mypy/semanal.py", line 1608, in visit_class_def
File "mypy/semanal.py", line 1680, in analyze_class
File "mypy/semanal.py", line 1699, in setup_type_vars
File "mypy/nodes.py", line 3088, in add_type_vars
AssertionError: Mixing type var tuples and param specs not supported yet
main.py:6: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.7.1
main.py:6: : note: use --pdb to drop into pdb
Metadata
Metadata
Assignees
Labels
crashtopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenatetopic-pep-646PEP 646 (TypeVarTuple, Unpack)PEP 646 (TypeVarTuple, Unpack)