You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash with experimental TypeVarTuple support #15241
I'm investigating a bug reported against pyright, and I was curious how mypy would handle the code. I tried it with mypy's experimental TypeVarTuple and Unpack support (--enable-incomplete-feature=TypeVarTuple --enable-incomplete-feature=Unpack) using mypy 1.3.0. The result was an "INTERNAL ERROR". That's not surprising given that the TypeVarTuple support is still under development. I'm reporting the crash in case those who are working on TypeVarTuple support in mypy find it useful.
This piece of code incorporates multiple variadic type variables, recursive function calls, tuple unpacking, nested calls that require bidirectional type inference, and higher-order functions. That makes it a potentially interesting test case.
Here's the code with the * replaced with Unpack (since mypy doesn't appear to support the new * syntax currently).
Traceback (most recent call last):
File "mypy/checkexpr.py", line 4890, in accept
File "mypy/nodes.py", line 1889, in accept
File "mypy/checkexpr.py", line 429, in visit_call_expr
File "mypy/checkexpr.py", line 549, in visit_call_expr_inner
File "mypy/checkexpr.py", line 1209, in check_call_expr_with_callee_type
File "mypy/checkexpr.py", line 1292, in check_call
File "mypy/checkexpr.py", line 1483, in check_callable_call
File "mypy/checkexpr.py", line 2101, in check_argument_types
AssertionError:
Activity
Streamline some elements of variadic types support (#15924)