Skip to content

Commit 0001936

Browse files
committed
Oops
1 parent ebfc647 commit 0001936

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/subtypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ def is_enum_value_pair(a: Type, b: Type) -> bool:
295295
return False
296296
if b.fallback.type.is_enum:
297297
a, b = b, a
298-
if b.fallback.type.is_enum:
298+
if b.fallback.type.is_enum or not a.fallback.type.is_enum:
299299
return False
300-
# At this point we have a pair (non-enum literal, enum literal).
300+
# At this point we have a pair (enum literal, non-enum literal).
301301
# Check that the non-enum fallback is compatible
302302
if not is_subtype(a.fallback, b.fallback):
303303
return False

0 commit comments

Comments
 (0)