Open
Description
Instances of user-defined variadic tuples subtypes are inferred incorrectly:
class Shape[*Ts](tuple[*Ts]): ...
reveal_type((42, )) # tuple[Literal[42]?]
reveal_type(Shape((42, ))) # __main__.Shape[Unpack[builtins.tuple[Never, ...]]]
https://mypy-play.net/?mypy=1.15.0&python=3.13&gist=2e2ba990a2112c97ca8d9d071c559a56
It should instead be inferred as Shape[Literal[42]]
.
This occurs with both mypy 1.15 and the current master branch.
related: #19093, #19105
ref: #19100 (comment)