variable annotated as tuple[SomeProtocol, ...]
loses protocol information on assignment
#12360
Labels
tuple[SomeProtocol, ...]
loses protocol information on assignment
#12360
Bug Report
re-assigning of a variable which is annotated with
tuple[P, ...]
loses its typing (it becomesTuple[The, Concrete, Classes]
) which breaks accessing of protocol membersTo Reproduce
Expected Behavior
I expect both of the
reveal_types
to be the same and there to be no error on access ofthing.f()
Actual Behavior
Your Environment
0.941
mypy.ini
(and other config files): N/Apython 3.8.10
ubuntu 20.04
The text was updated successfully, but these errors were encountered: