Skip to content

mypy crashes when passing multiple variadic tuples #19704

@randolf-scholz

Description

@randolf-scholz
class A[*Ts]: ...

type x0 = tuple[int, ...]
type x1 = tuple[int, *tuple[int, ...]]

A[*x0, *x0]  # E: More than one Unpack in a type is not allowed
A[*x1, *x1]  # crash

https://mypy-play.net/?mypy=master&python=3.12&gist=f6165c82cda9047dbe8aa7ab5c746eda

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions