We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a4df2b commit 2f1264bCopy full SHA for 2f1264b
mypy/meet.py
@@ -90,10 +90,15 @@ def meet_types(s: Type, t: Type) -> ProperType:
90
return t
91
92
if not isinstance(s, UnboundType) and not isinstance(t, UnboundType):
93
+ swap = isinstance(s, Instance) and not isinstance(t, Instance)
94
+ if swap:
95
+ s, t = t, s
96
if is_proper_subtype(s, t, ignore_promotions=True):
97
return s
98
if is_proper_subtype(t, s, ignore_promotions=True):
99
100
101
102
103
if isinstance(s, ErasedType):
104
0 commit comments