Skip to content

Commit 18562b0

Browse files
committed
fix
1 parent 8b8a3a7 commit 18562b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mypy/solve.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,8 @@ def solve_one(lowers: Iterable[Type], uppers: Iterable[Type]) -> Type | None:
291291
# Note that joins in theory should be commutative, but in practice some bugs mean this is
292292
# also a source of non-deterministic type checking results.
293293
sorted_lowers = sorted(lowers, key=_join_sorted_key)
294-
bottom = join_type_list(sorted_lowers)
295-
if isinstance(bottom, UninhabitedType):
296-
bottom = None
294+
if sorted_lowers:
295+
bottom = join_type_list(sorted_lowers)
297296

298297
for target in uppers:
299298
if top is None:

0 commit comments

Comments
 (0)