Skip to content

Commit a9b23ff

Browse files
committed
Fix assign to type
1 parent 2c29487 commit a9b23ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/subtypes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,8 @@ def visit_type_var(self, left: TypeVarType) -> bool:
628628
return True
629629
if left.values and self._is_subtype(UnionType.make_union(left.values), right):
630630
return True
631+
if left.has_default():
632+
return self._is_subtype(left.default, self.right)
631633
return self._is_subtype(left.upper_bound, self.right)
632634

633635
def visit_param_spec(self, left: ParamSpecType) -> bool:

0 commit comments

Comments
 (0)