Skip to content

Commit 4a51ded

Browse files
authored
Presevre original type
1 parent 244ad9e commit 4a51ded

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/checker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8194,8 +8194,7 @@ def conditional_types(
81948194
current_type = try_expanding_sum_type_to_union(current_type, enum_name)
81958195
proposed_items = [type_range.item for type_range in proposed_type_ranges]
81968196
proposed_type = make_simplified_union(proposed_items)
8197-
current_type = get_proper_type(current_type)
8198-
if isinstance(current_type, AnyType):
8197+
if isinstance(get_proper_type(current_type), AnyType):
81998198
return proposed_type, current_type
82008199
elif isinstance(proposed_type, AnyType):
82018200
# We don't really know much about the proposed type, so we shouldn't

0 commit comments

Comments
 (0)