Open gvanrossum opened 6 years ago
Note that this can't be fixed by adding an annotation for a
-- neither annotating it as Union[A, B]
nor Base
helps. (Basically you have to use a cast or rework the inheritance pattern.)
I think this is another symptom of https://github.com/python/mypy/issues/3257
Also this is yet another reason to have intersections.
(modified the example to force the join given #17427 )
Could we do something better here? Ideally the inferred type of
a
should be an anonymous subclass ofMix
andBase
.