File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ def solve_one(lowers: Iterable[Type], uppers: Iterable[Type]) -> Type | None:
270270 uppers = new_uppers
271271
272272 # ...unless this is the only information we have, then we just pass it on.
273+ lowers = list (lowers )
273274 if not uppers and not lowers :
274275 candidate = UninhabitedType ()
275276 candidate .ambiguous = True
@@ -285,7 +286,7 @@ def solve_one(lowers: Iterable[Type], uppers: Iterable[Type]) -> Type | None:
285286 # This deviates from the general mypy semantics because
286287 # recursive types are union-heavy in 95% of cases.
287288 # Retain `None` when no bottoms were provided to avoid bogus `Never` inference.
288- bottom = UnionType .make_union (list ( lowers ) )
289+ bottom = UnionType .make_union (lowers )
289290 else :
290291 # The order of lowers is non-deterministic.
291292 # We attempt to sort lowers because joins are non-associative. For instance:
You can’t perform that action at this time.
0 commit comments